g2o
Public Member Functions | List of all members
g2o::VertexPointXYZWriteGnuplotAction Class Reference

#include <vertex_pointxyz.h>

Inheritance diagram for g2o::VertexPointXYZWriteGnuplotAction:
Inheritance graph
[legend]
Collaboration diagram for g2o::VertexPointXYZWriteGnuplotAction:
Collaboration graph
[legend]

Public Member Functions

 VertexPointXYZWriteGnuplotAction ()
 
virtual HyperGraphElementActionoperator() (HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
 redefine this to do the action stuff. If successful, the action returns a pointer to itself More...
 
- Public Member Functions inherited from g2o::WriteGnuplotAction
 WriteGnuplotAction (const std::string &typeName_)
 
- Public Member Functions inherited from g2o::HyperGraphElementAction
 HyperGraphElementAction (const std::string &typeName_="")
 
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...
 

Additional Inherited Members

- Public Types inherited from g2o::HyperGraphElementAction
typedef std::map< std::string, HyperGraphElementAction * > ActionMap
 
- Protected Attributes inherited from g2o::HyperGraphElementAction
std::string _typeName
 
std::string _name
 

Detailed Description

Definition at line 86 of file vertex_pointxyz.h.

Constructor & Destructor Documentation

g2o::VertexPointXYZWriteGnuplotAction::VertexPointXYZWriteGnuplotAction ( )

Definition at line 102 of file vertex_pointxyz.cpp.

102  :
103  WriteGnuplotAction(typeid(VertexPointXYZ).name())
104  {
105  }
const std::string & name() const
returns the name of an action, e.g "draw"
WriteGnuplotAction(const std::string &typeName_)

Member Function Documentation

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

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

Reimplemented from g2o::HyperGraphElementAction.

Definition at line 107 of file vertex_pointxyz.cpp.

References __PRETTY_FUNCTION__, g2o::HyperGraphElementAction::_typeName, g2o::BaseVertex< D, T >::estimate(), and g2o::WriteGnuplotAction::Parameters::os.

108  {
109  if (typeid(*element).name()!=_typeName)
110  return 0;
111  WriteGnuplotAction::Parameters* params=static_cast<WriteGnuplotAction::Parameters*>(params_);
112  if (!params->os){
113  std::cerr << __PRETTY_FUNCTION__ << ": warning, no valid os specified" << std::endl;
114  return 0;
115  }
116 
117  VertexPointXYZ* v = static_cast<VertexPointXYZ*>(element);
118  *(params->os) << v->estimate().x() << " " << v->estimate().y() << " " << v->estimate().z() << " " << std::endl;
119  return this;
120  }
#define __PRETTY_FUNCTION__
Definition: macros.h:89

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