13 #include <wpi/Twine.h>
14 #include <wpi/deprecated.h>
16 #include "frc/smartdashboard/SendableRegistry.h"
27 template <
typename Derived>
36 static_cast<Derived*>(&rhs));
42 static_cast<Derived*>(&rhs));
51 WPI_DEPRECATED(
"use SendableRegistry::GetName()")
54 static_cast<const Derived*>(
this));
62 WPI_DEPRECATED(
"use SendableRegistry::SetName()")
73 WPI_DEPRECATED(
"use SendableRegistry::SetName()")
84 WPI_DEPRECATED(
"use SendableRegistry::GetSubsystem()")
87 static_cast<const Derived*>(
this));
95 WPI_DEPRECATED(
"use SendableRegistry::SetSubsystem()")
107 WPI_DEPRECATED(
"use SendableRegistry::AddChild()")
118 WPI_DEPRECATED(
"use SendableRegistry::AddChild()")
131 WPI_DEPRECATED(
"use SendableRegistry::SetName()")
134 moduleType, channel);
146 WPI_DEPRECATED(
"use SendableRegistry::SetName()")
147 void
SetName(const
wpi::Twine& moduleType,
int moduleNumber,
int channel) {
149 moduleType, moduleNumber, channel);
std::string GetName() const
Gets the name of this Sendable object.
Definition: SendableHelper.h:52
std::string GetSubsystem(const Sendable *sendable) const
Gets the subsystem name of an object.
std::string GetSubsystem() const
Gets the subsystem name of this Sendable object.
Definition: SendableHelper.h:85
std::string GetName(const Sendable *sendable) const
Gets the name of an object.
void Move(Sendable *to, Sendable *from)
Moves an object in the registry (for use in move constructors/assignments).
static SendableRegistry & GetInstance()
Gets an instance of the SendableRegistry class.
void SetSubsystem(Sendable *sendable, const wpi::Twine &subsystem)
Sets the subsystem name of an object.
WPILib C++ utilities (wpiutil) namespace.
Definition: EventLoopRunner.h:17
void AddChild(std::shared_ptr< Sendable > child)
Add a child component.
Definition: SendableHelper.h:108
Interface for Sendable objects.
Definition: Sendable.h:17
void SetName(const wpi::Twine &name)
Sets the name of this Sendable object.
Definition: SendableHelper.h:63
A class that enforces constraints on the differential drive kinematics.
Definition: SPIAccelerometerSim.h:16
void SetName(Sendable *sendable, const wpi::Twine &name)
Sets the name of an object.
void SetSubsystem(const wpi::Twine &subsystem)
Sets the subsystem name of this Sendable object.
Definition: SendableHelper.h:96
bool Remove(Sendable *sendable)
Removes an object from the registry.
A helper class for use with objects that add themselves to SendableRegistry.
Definition: SendableHelper.h:28
void AddChild(Sendable *parent, Sendable *child)
Adds a child object to an object.