WPILibC++ 2024.3.2
LayoutType.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <string_view>
8
9namespace frc {
10
11/**
12 * Represents the type of a layout in Shuffleboard. Using this is preferred over
13 * specifying raw strings, to avoid typos and having to know or look up the
14 * exact string name for a desired layout.
15 *
16 * @see BuiltInLayouts the built-in layout types
17 */
19 public:
20 explicit constexpr LayoutType(const char* layoutName)
21 : m_layoutName(layoutName) {}
22 ~LayoutType() = default;
23
24 /**
25 * Gets the string type of the layout as defined by that layout in
26 * Shuffleboard.
27 */
29
30 private:
31 const char* m_layoutName;
32};
33
34} // namespace frc
Represents the type of a layout in Shuffleboard.
Definition: LayoutType.h:18
std::string_view GetLayoutName() const
Gets the string type of the layout as defined by that layout in Shuffleboard.
~LayoutType()=default
constexpr LayoutType(const char *layoutName)
Definition: LayoutType.h:20
basic_string_view< char > string_view
Definition: core.h:501
Definition: AprilTagPoseEstimator.h:15