27#ifndef G2O_HYPER_GRAPH_ACTION_H
28#define G2O_HYPER_GRAPH_ACTION_H
80 typedef std::map<std::string, HyperGraphElementActionPtr>
ActionMap;
98 const std::string&
typeName()
const {
return _typeName; }
101 const std::string&
name()
const {
return _name; }
104 void setTypeName(
const std::string& typeName_);
137 bool unregisterAction(
155 static void destroy();
165 bool unregisterAction(
184 const std::string& typeName =
"");
211 virtual bool refreshPropertyPtrs(
213 void initializeDrawActionsCache();
227#ifdef G2O_DEBUG_ACTIONLIB
228 std::cout << __FUNCTION__ <<
": Registering action of type "
229 <<
typeid(T).name() << std::endl;
241#define G2O_REGISTER_ACTION(classname) \
242 extern "C" void g2o_action_##classname(void) {} \
243 static g2o::RegisterActionProxy<classname> g_action_proxy_##classname;
HyperGraphElementAction * _cacheDrawActions
Parameters * _previousParams
library of actions, indexed by the action name;
bool registerAction(const HyperGraphElementAction::HyperGraphElementActionPtr &action)
static HyperGraphActionLibrary * instance()
return the single instance of the HyperGraphActionLibrary
HyperGraphActionLibrary(HyperGraphActionLibrary const &)=delete
HyperGraphActionLibrary & operator=(HyperGraphActionLibrary const &)=delete
HyperGraphActionLibrary()=default
static std::unique_ptr< HyperGraphActionLibrary > actionLibInstance
HyperGraphElementAction::ActionMap & actionMap()
HyperGraphElementAction::ActionMap _actionMap
Abstract action that operates on an entire graph.
Abstract action that operates on a graph entity.
std::map< std::string, HyperGraphElementActionPtr > ActionMap
const std::string & name() const
returns the name of an action, e.g "draw"
const std::string & typeName() const
returns the typeid name of the action
std::shared_ptr< HyperGraphElementAction > HyperGraphElementActionPtr
data packet for a vertex. Extend this class to store in the vertices the potential additional informa...
a collection of properties mapping from name to the property itself
HyperGraphElementAction::HyperGraphElementActionPtr _action
void applyAction(HyperGraph *graph, HyperGraphElementAction *action, HyperGraphElementAction::Parameters *params, const std::string &typeName)