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

void add_child (NodeConstHandle nh) const
NodeHandle add_child (std::string name, NodeType t) 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>
T get_association () const
 Return the associated pointer for this node.
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.

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.

Constructor & Destructor Documentation

◆ NodeHandle()

RMF::NodeHandle::NodeHandle ( )

Definition at line 78 of file NodeHandle.h.

Member Function Documentation

◆ add_child() [1/2]

void RMF::NodeHandle::add_child ( NodeConstHandle nh) const

Add an existing node as a child.

◆ add_child() [2/2]

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.

◆ get_children()

NodeHandles RMF::NodeHandle::get_children ( ) const

◆ replace_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.

◆ set_frame_value()

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

Definition at line 103 of file NodeHandle.h.

◆ set_static_value()

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.

◆ set_value()

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: