WPILibC++ 2023.4.3-108-ge5452e3
|
Common base class for all Mechanism2d node types. More...
#include <frc/smartdashboard/MechanismObject2d.h>
Public Member Functions | |
virtual | ~MechanismObject2d ()=default |
const std::string & | GetName () const |
Retrieve the object's name. More... | |
template<typename T , typename... Args> requires std::convertible_to<T*, MechanismObject2d*> | |
T * | Append (std::string_view name, Args &&... args) |
Append a Mechanism object that is based on this one. More... | |
Protected Member Functions | |
MechanismObject2d (std::string_view name) | |
virtual void | UpdateEntries (std::shared_ptr< nt::NetworkTable > table)=0 |
Update all entries with new ones from a new table. More... | |
Protected Attributes | |
wpi::mutex | m_mutex |
Friends | |
class | Mechanism2d |
Common base class for all Mechanism2d node types.
To append another node, call Append with the type of node and its construction parameters. None of the node types are designed to be constructed directly, and are owned by their parent node/container - obtain pointers from the Append function or similar factory methods.
|
explicitprotected |
|
virtualdefault |
|
inline |
Append a Mechanism object that is based on this one.
name | the name of the new object. |
args | constructor arguments of the object type. |
if | an object with the given name already exists. |
const std::string & frc::MechanismObject2d::GetName | ( | ) | const |
Retrieve the object's name.
|
protectedpure virtual |
Update all entries with new ones from a new table.
table | the new table. |
Implemented in frc::MechanismLigament2d.
|
friend |
|
mutableprotected |