RMF
RMF::NodeHandle Class Reference

A handle for a particular node in the hierarchy. More...

#include <RMF/NodeHandle.h>

+ Inheritance diagram for RMF::NodeHandle:

Public Member Functions

NodeHandle add_child (std::string name, NodeType t) const
 
void add_child (NodeConstHandle nh) const
 
NodeHandles get_children () const
 
FileHandle get_file () const
 
NodeHandle replace_child (NodeHandle child, std::string name, NodeType t) const
 
- Public Member Functions inherited from RMF::NodeConstHandle
template<class T >
get_association () const
 Return the associated pointer for this node. More...
 
NodeConstHandles get_children () const
 
FileConstHandle get_file () const
 
bool get_has_association () const
 
NodeID get_id () const
 
std::string get_name () const
 
NodeType get_type () const
 get the type of this node
 
 operator NodeID () const
 
template<class T >
void set_association (const T &v, bool overwrite=false) const
 
template<class Tag >
Nullable< typename Tag::Type > get_value (ID< Tag > k) const
 
template<class Tag >
bool get_has_value (ID< Tag > k) const
 
template<class Tag >
Nullable< typename Tag::Type > get_frame_value (ID< Tag > k) const
 
template<class Tag >
Nullable< typename Tag::Type > get_static_value (ID< Tag > k) const
 

Functions to access attributes

template<class Tag >
void set_frame_value (ID< Tag > k, typename Tag::ArgumentType v) const
 set the value of the attribute k for this node on the current frame.
 
template<class Tag >
void set_value (ID< Tag > k, typename Tag::ArgumentType v) const
 
template<class Tag >
void set_static_value (ID< Tag > k, typename Tag::ArgumentType v) const
 set the value of the attribute k for all frames. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RMF::NodeConstHandle
FrameID get_current_frame_id () const
 
std::string get_file_name () const
 
- Protected Attributes inherited from RMF::NodeConstHandle
NodeID node_
 
std::shared_ptr
< internal::SharedData > 
shared_
 

Detailed Description

Use these handles to access and modify parts of the hierarchy.

Make sure to check out the base class for the const methods.

Examples:
benchmark/benchmark_rmf.cpp.

Definition at line 60 of file NodeHandle.h.

Member Function Documentation

NodeHandle RMF::NodeHandle::add_child ( std::string  name,
NodeType  t 
) const

Create a new node as a child of this one.

Examples:
benchmark/benchmark_rmf.cpp.
void RMF::NodeHandle::add_child ( NodeConstHandle  nh) const

Add an existing node as a child.

NodeHandle RMF::NodeHandle::replace_child ( NodeHandle  child,
std::string  name,
NodeType  t 
) const

Create a new node that replaces an existing child of this one. The new node will take the place of the existing child, and the existing child will be moved to become the only child of the new node.

template<class Tag >
void RMF::NodeHandle::set_static_value ( ID< Tag >  k,
typename Tag::ArgumentType  v 
) const

Definition at line 122 of file NodeHandle.h.

template<class Tag >
void RMF::NodeHandle::set_value ( ID< Tag >  k,
typename Tag::ArgumentType  v 
) const

Set the value

  • if the attribute has a static value and it is equal to the current one do nothing.
  • if the attribute doesn't have a static value, set it,
  • otherwise set the frame value.

Definition at line 115 of file NodeHandle.h.


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