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

#include <vertex_segment2d.h>

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

Public Member Functions

 VertexSegment2DWriteGnuplotAction ()
 
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 93 of file vertex_segment2d.h.

Constructor & Destructor Documentation

g2o::VertexSegment2DWriteGnuplotAction::VertexSegment2DWriteGnuplotAction ( )

Definition at line 63 of file vertex_segment2d.cpp.

63 : WriteGnuplotAction(typeid(VertexSegment2D).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::VertexSegment2DWriteGnuplotAction::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 65 of file vertex_segment2d.cpp.

References __PRETTY_FUNCTION__, g2o::HyperGraphElementAction::_typeName, g2o::VertexSegment2D::estimateP1(), g2o::VertexSegment2D::estimateP2(), g2o::HyperGraphElementAction::name(), g2o::WriteGnuplotAction::Parameters::os, and g2o::DrawAction::refreshPropertyPtrs().

65  {
66  if (typeid(*element).name()!=_typeName)
67  return 0;
68 
69  WriteGnuplotAction::Parameters* params=static_cast<WriteGnuplotAction::Parameters*>(params_);
70  if (!params->os){
71  std::cerr << __PRETTY_FUNCTION__ << ": warning, on valid os specified" << std::endl;
72  return 0;
73  }
74 
75  VertexSegment2D* v = static_cast<VertexSegment2D*>(element);
76  *(params->os) << v->estimateP1().x() << " " << v->estimateP1().y() << std::endl;
77  *(params->os) << v->estimateP2().x() << " " << v->estimateP2().y() << std::endl;
78  *(params->os) << std::endl;
79  return this;
80  }
#define __PRETTY_FUNCTION__
Definition: macros.h:89

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