g2o
Loading...
Searching...
No Matches
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_)
 
- 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)
 
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
 

Additional Inherited Members

- Public Types inherited from g2o::HyperGraphElementAction
typedef std::shared_ptr< HyperGraphElementActionHyperGraphElementActionPtr
 
typedef std::map< std::string, HyperGraphElementActionPtrActionMap
 
- Protected Attributes inherited from g2o::HyperGraphElementAction
std::string _typeName
 
std::string _name
 

Detailed Description

Definition at line 79 of file vertex_point_xy.h.

Constructor & Destructor Documentation

◆ VertexPointXYWriteGnuplotAction()

g2o::VertexPointXYWriteGnuplotAction::VertexPointXYWriteGnuplotAction ( )

Definition at line 52 of file vertex_point_xy.cpp.

53 : 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

◆ operator()()

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 55 of file vertex_point_xy.cpp.

57 {
58 if (typeid(*element).name() != _typeName) return nullptr;
59
60 WriteGnuplotAction::Parameters* params =
61 static_cast<WriteGnuplotAction::Parameters*>(params_);
62 if (!params->os) {
63 return nullptr;
64 }
65
66 VertexPointXY* v = static_cast<VertexPointXY*>(element);
67 *(params->os) << v->estimate().x() << " " << v->estimate().y() << std::endl;
68 return this;
69}

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


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