DART  6.7.3
dart::dynamics::Node::Properties Class Referenceabstract

If your Node has a Properties class, then that Properties class should inherit this Node::Properties class. More...

#include <Node.hpp>

Inheritance diagram for dart::dynamics::Node::Properties:
dart::common::Cloneable< Properties >

Public Member Functions

virtual std::unique_ptr< Propertiesclone () const=0
 Implement this function to allow your Cloneable type to be copied safely. More...
 
virtual void copy (const Properties &anotherCloneable)=0
 Copy the contents of anotherCloneable into this one. More...
 

Detailed Description

If your Node has a Properties class, then that Properties class should inherit this Node::Properties class.

This allows us to safely serialize, store, and clone the properties of arbitrary Node extensions. If your Node has no properties, then you do not have to worry about extending this class, because Node::getNodeProperties() will simply return a nullptr by default, which is taken to indicate that it has no properties.

The distinction between the State class and the Properties class is that State will get stored in BodyNode::ExtendedState whereas Properties will get stored in BodyNode::ExtendedProperties. Typically Properties are values that only change rarely if ever, whereas State contains values that might change as often as every time step.

Member Function Documentation

◆ clone()

virtual std::unique_ptr<Properties > dart::common::Cloneable< Properties >::clone ( ) const
pure virtualinherited

Implement this function to allow your Cloneable type to be copied safely.

◆ copy()

virtual void dart::common::Cloneable< Properties >::copy ( const T &  anotherCloneable)
pure virtualinherited

Copy the contents of anotherCloneable into this one.