Common base class for all Mechanism2d node types.
More...
#include <frc/smartdashboard/MechanismObject2d.h>
|
virtual | ~MechanismObject2d ()=default |
|
const std::string & | GetName () const |
| Retrieve the object's name.
|
|
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.
|
|
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.
- See also
- Mechanism2d.
◆ MechanismObject2d()
frc::MechanismObject2d::MechanismObject2d |
( |
std::string_view | name | ) |
|
|
explicitprotected |
◆ ~MechanismObject2d()
virtual frc::MechanismObject2d::~MechanismObject2d |
( |
| ) |
|
|
virtualdefault |
◆ Append()
template<typename T , typename... Args>
requires std::convertible_to<T*,
MechanismObject2d*>
T * frc::MechanismObject2d::Append |
( |
std::string_view | name, |
|
|
Args &&... | args ) |
|
inline |
Append a Mechanism object that is based on this one.
- Parameters
-
name | the name of the new object. |
args | constructor arguments of the object type. |
- Returns
- the constructed and appended object, useful for variable assignments and call chaining.
- Exceptions
-
if | an object with the given name already exists. |
◆ GetName()
const std::string & frc::MechanismObject2d::GetName |
( |
| ) |
const |
Retrieve the object's name.
- Returns
- the object's name relative to its parent.
◆ UpdateEntries()
virtual void frc::MechanismObject2d::UpdateEntries |
( |
std::shared_ptr< nt::NetworkTable > | table | ) |
|
|
protectedpure virtual |
◆ Mechanism2d
◆ m_mutex
The documentation for this class was generated from the following file: