g2o
Loading...
Searching...
No Matches
g2o::HyperGraphElementAction Class Reference

Abstract action that operates on a graph entity. More...

#include <hyper_graph_action.h>

Inheritance diagram for g2o::HyperGraphElementAction:

Classes

struct  Parameters

Public Types

typedef std::shared_ptr< HyperGraphElementAction > HyperGraphElementActionPtr
typedef std::map< std::string, HyperGraphElementActionPtr > ActionMap

Public Member Functions

 HyperGraphElementAction (const std::string &typeName_="")
virtual HyperGraphElementAction * operator() (HyperGraph::HyperGraphElement *element, Parameters *parameters)
virtual HyperGraphElementAction * operator() (const HyperGraph::HyperGraphElement *element, Parameters *parameters)
virtual ~HyperGraphElementAction ()
const std::string & typeName () const
 returns the typeid name of the action
const std::string & name () const
 returns the name of an action, e.g "draw"
void setTypeName (const std::string &typeName_)
 sets the type on which an action has to operate

Protected Attributes

std::string _typeName
std::string _name

Detailed Description

Abstract action that operates on a graph entity.

Definition at line 74 of file hyper_graph_action.h.

Member Typedef Documentation

◆ ActionMap

Definition at line 80 of file hyper_graph_action.h.

◆ HyperGraphElementActionPtr

Constructor & Destructor Documentation

◆ HyperGraphElementAction()

g2o::HyperGraphElementAction::HyperGraphElementAction ( const std::string & typeName_ = "")
explicit

an action should be instantiated with the typeid.name of the graph element on which it operates

Definition at line 56 of file hyper_graph_action.cpp.

References _typeName.

Referenced by g2o::DrawAction::DrawAction(), operator()(), operator()(), g2o::HyperGraphElementActionCollection::operator()(), g2o::HyperGraphElementActionCollection::operator()(), and g2o::WriteGnuplotAction::WriteGnuplotAction().

◆ ~HyperGraphElementAction()

g2o::HyperGraphElementAction::~HyperGraphElementAction ( )
virtual

Definition at line 74 of file hyper_graph_action.cpp.

Member Function Documentation

◆ name()

◆ operator()() [1/2]

HyperGraphElementAction * g2o::HyperGraphElementAction::operator() ( const HyperGraph::HyperGraphElement * element,
HyperGraphElementAction::Parameters * parameters )
virtual

redefine this to do the action stuff. If successful, the action returns a pointer to itself

Reimplemented in g2o::HyperGraphElementActionCollection.

Definition at line 68 of file hyper_graph_action.cpp.

References HyperGraphElementAction().

◆ operator()() [2/2]

◆ setTypeName()

void g2o::HyperGraphElementAction::setTypeName ( const std::string & typeName_)

sets the type on which an action has to operate

Definition at line 59 of file hyper_graph_action.cpp.

References _typeName.

◆ typeName()

const std::string & g2o::HyperGraphElementAction::typeName ( ) const
inline

returns the typeid name of the action

Definition at line 98 of file hyper_graph_action.h.

References _typeName.

Member Data Documentation

◆ _name

◆ _typeName


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