WPILibC++  2019.1.1-beta-4-32-g6bdd7ce
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
NamedSendable.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2012-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <string>
11 
12 #include <wpi/deprecated.h>
13 
14 #include "frc/smartdashboard/Sendable.h"
15 
16 namespace frc {
17 
23 class NamedSendable : public Sendable {
24  public:
25  WPI_DEPRECATED("use Sendable directly instead")
26  NamedSendable() = default;
27 
28  void SetName(const wpi::Twine& name) override;
29  std::string GetSubsystem() const override;
30  void SetSubsystem(const wpi::Twine& subsystem) override;
31  void InitSendable(SendableBuilder& builder) override;
32 };
33 
34 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
std::string GetSubsystem() const override
Gets the subsystem name of this Sendable object.
void InitSendable(SendableBuilder &builder) override
Initializes this Sendable object.
void SetName(const wpi::Twine &name) override
Sets the name of this Sendable object.
Definition: SendableBuilder.h:23
Definition: Sendable.h:18
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
The interface for sendable objects that gives the sendable a default name in the Smart Dashboard...
Definition: NamedSendable.h:23
void SetSubsystem(const wpi::Twine &subsystem) override
Sets the subsystem name of this Sendable object.