g2o
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
g2o::HyperGraphElementAction Class Reference

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

#include <hyper_graph_action.h>

Inheritance diagram for g2o::HyperGraphElementAction:
Inheritance graph
[legend]

Classes

struct  Parameters
 

Public Types

typedef std::map< std::string, HyperGraphElementAction * > ActionMap
 

Public Member Functions

 HyperGraphElementAction (const std::string &typeName_="")
 
virtual HyperGraphElementActionoperator() (HyperGraph::HyperGraphElement *element, Parameters *parameters)
 redefine this to do the action stuff. If successful, the action returns a pointer to itself More...
 
virtual HyperGraphElementActionoperator() (const HyperGraph::HyperGraphElement *element, Parameters *parameters)
 redefine this to do the action stuff. If successful, the action returns a pointer to itself More...
 
virtual ~HyperGraphElementAction ()
 destroyed actions release the memory More...
 
const std::string & typeName () const
 returns the typeid name of the action More...
 
const std::string & name () const
 returns the name of an action, e.g "draw" More...
 
void setTypeName (const std::string &typeName_)
 sets the type on which an action has to operate More...
 

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

Definition at line 79 of file hyper_graph_action.h.

Constructor & Destructor Documentation

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

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

Definition at line 63 of file hyper_graph_action.cpp.

64  {
65  _typeName = typeName_;
66  }
g2o::HyperGraphElementAction::~HyperGraphElementAction ( )
virtual

destroyed actions release the memory

Definition at line 84 of file hyper_graph_action.cpp.

85  {
86  }

Member Function Documentation

const std::string& g2o::HyperGraphElementAction::name ( ) const
inline
HyperGraphElementAction * g2o::HyperGraphElementAction::operator() ( HyperGraph::HyperGraphElement element,
HyperGraphElementAction::Parameters parameters 
)
virtual
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 79 of file hyper_graph_action.cpp.

80  {
81  return 0;
82  }
void g2o::HyperGraphElementAction::setTypeName ( const std::string &  typeName_)

sets the type on which an action has to operate

Definition at line 68 of file hyper_graph_action.cpp.

Referenced by g2o::G2O_ATTRIBUTE_CONSTRUCTOR().

69  {
70  _typeName = typeName_;
71  }
const std::string& g2o::HyperGraphElementAction::typeName ( ) const
inline

returns the typeid name of the action

Definition at line 94 of file hyper_graph_action.h.

Referenced by g2o::applyAction(), and g2o::HyperGraphElementActionCollection::registerAction().

94 { return _typeName;}

Member Data Documentation

std::string g2o::HyperGraphElementAction::_name
protected
std::string g2o::HyperGraphElementAction::_typeName
protected

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