MIRA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
AbstractTransformerNode Class Referenceabstract

Abstract base class where all other different types of transformation nodes must be derived from. More...

#include <transform/TransformerNode.h>

Inheritance diagram for AbstractTransformerNode:
Inheritance graph
[legend]

Public Types

typedef AbstractTransformerNodeAbstractNodePtr
 Pointer type for this AbstractTransformerNode. More...
 

Public Member Functions

const std::string & getID () const
 Returns the id of this node. More...
 
const std::list< AbstractNodePtr > & getChildren () const
 Returns a list with all children of this node. More...
 
const AbstractNodePtrgetParent () const
 Returns the parent of the node. More...
 
uint32 getDescendantCount () const
 Returns the number of descendants of this node (children, grandchildren, etc.) More...
 
bool isAncestorOf (const AbstractNodePtr other) const
 Returns true, if the this node is an ancestor of the given 'other' node. More...
 
virtual bool isEmpty () const =0
 Returns if the node has data or is empty. More...
 
template<typename Transform , typename Filter >
Transform getTransform (const Time &time, Filter &&filter)
 Returns the transform stored in this node at the specified time stamp. More...
 

Protected Member Functions

 AbstractTransformerNode (const std::string &id)
 
virtual ~AbstractTransformerNode ()
 

Protected Attributes

std::string mID
 The id of this node. More...
 
AbstractNodePtr mParent
 Pointer to the parent node within the tree. More...
 
std::list< AbstractNodePtrmChildren
 List with pointers to the children within the transformation tree. More...
 

Friends

class TransformerBase
 

Detailed Description

Abstract base class where all other different types of transformation nodes must be derived from.

Each node can take part in a transformation tree that is managed by the Transformer (GenericTransformer).

Moreover, each node has a unique ID within the Transformer it belongs to. Each node stores a pointer to its parent to its children within the transformation tree. Last but not least, each node stores a transformation history. Hence, the transformation of the node at a certain time stamp can be queried using the getTransform() method. Note, that the derived classes need to implement the getTransform() method and hence the storage of the transformation data.

Member Typedef Documentation

◆ AbstractNodePtr

Pointer type for this AbstractTransformerNode.

Constructor & Destructor Documentation

◆ AbstractTransformerNode()

AbstractTransformerNode ( const std::string &  id)
inlineprotected

◆ ~AbstractTransformerNode()

virtual ~AbstractTransformerNode ( )
inlineprotectedvirtual

Member Function Documentation

◆ getID()

const std::string& getID ( ) const
inline

Returns the id of this node.

◆ getChildren()

const std::list<AbstractNodePtr>& getChildren ( ) const
inline

Returns a list with all children of this node.

◆ getParent()

const AbstractNodePtr& getParent ( ) const
inline

Returns the parent of the node.

◆ getDescendantCount()

uint32 getDescendantCount ( ) const

Returns the number of descendants of this node (children, grandchildren, etc.)

◆ isAncestorOf()

bool isAncestorOf ( const AbstractNodePtr  other) const

Returns true, if the this node is an ancestor of the given 'other' node.

◆ isEmpty()

virtual bool isEmpty ( ) const
pure virtual

Returns if the node has data or is empty.

Implemented in TransformerNode< StorageTransform >, and FrameworkTransformerNode.

◆ getTransform()

Transform getTransform ( const Time time,
Filter &&  filter 
)
inline

Returns the transform stored in this node at the specified time stamp.

Additionally, the transform can be filtered depending on the specified filter, e.g. to allow linear interpolation of transforms around the specified time stamp.

Note
This method must be implemented in derived classes !

Friends And Related Function Documentation

◆ TransformerBase

friend class TransformerBase
friend

Member Data Documentation

◆ mID

std::string mID
protected

The id of this node.

◆ mParent

AbstractNodePtr mParent
protected

Pointer to the parent node within the tree.

◆ mChildren

std::list<AbstractNodePtr> mChildren
protected

List with pointers to the children within the transformation tree.


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