dart
List of all members
dart::dynamics::Node::State Class Reference

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

#include <Node.hpp>

Inheritance diagram for dart::dynamics::Node::State:
Inheritance graph
[legend]
Collaboration diagram for dart::dynamics::Node::State:
Collaboration graph
[legend]

Additional Inherited Members

- Public Member Functions inherited from dart::common::Cloneable< State >
 Cloneable ()=default
 Default constructor.
 
 Cloneable (const Cloneable &doNotCopy)=delete
 Do not copy this class directly, use clone() or copy() instead.
 
virtual ~Cloneable ()=default
 Virtual destructor.
 
Cloneableoperator= (const Cloneable &doNotCopy)=delete
 Do not copy this class directly, use clone() or copy() instead.
 
virtual std::unique_ptr< Stateclone () const=0
 Implement this function to allow your Cloneable type to be copied safely.
 
virtual void copy (const State &anotherCloneable)=0
 Copy the contents of anotherCloneable into this one.
 

Detailed Description

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

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

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.


The documentation for this class was generated from the following file: