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

#include <vertex_point_xy.h>

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

Public Member Functions

 VertexPointXYWriteGnuplotAction ()
 
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 88 of file vertex_point_xy.h.

Constructor & Destructor Documentation

g2o::VertexPointXYWriteGnuplotAction::VertexPointXYWriteGnuplotAction ( )

Definition at line 58 of file vertex_point_xy.cpp.

58 : WriteGnuplotAction(typeid(VertexPointXY).name()){}
const std::string & name() const
returns the name of an action, e.g "draw"
WriteGnuplotAction(const std::string &typeName_)

Member Function Documentation

HyperGraphElementAction * g2o::VertexPointXYWriteGnuplotAction::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 60 of file vertex_point_xy.cpp.

References __PRETTY_FUNCTION__, g2o::HyperGraphElementAction::_typeName, g2o::OptimizableGraph::Vertex::cacheContainer(), g2o::opengl::drawPoint(), g2o::BaseVertex< D, T >::estimate(), LANDMARK_VERTEX_COLOR, g2o::HyperGraphElementAction::name(), g2o::WriteGnuplotAction::Parameters::os, g2o::DrawAction::refreshPropertyPtrs(), and g2o::HyperGraph::DataContainer::userData().

60  {
61  if (typeid(*element).name()!=_typeName)
62  return 0;
63 
64  WriteGnuplotAction::Parameters* params=static_cast<WriteGnuplotAction::Parameters*>(params_);
65  if (!params->os){
66  std::cerr << __PRETTY_FUNCTION__ << ": warning, on valid os specified" << std::endl;
67  return 0;
68  }
69 
70  VertexPointXY* v = static_cast<VertexPointXY*>(element);
71  *(params->os) << v->estimate().x() << " " << v->estimate().y() << std::endl;
72  return this;
73  }
#define __PRETTY_FUNCTION__
Definition: macros.h:89

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