All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
OpenRAVE::xmlreaders::TrajectoryReader Class Reference

create a xml parser for trajectories More...

#include <xmlreaders.h>

Inheritance diagram for OpenRAVE::xmlreaders::TrajectoryReader:
Inheritance graph
Collaboration diagram for OpenRAVE::xmlreaders::TrajectoryReader:
Collaboration graph

Public Member Functions

 TrajectoryReader (EnvironmentBasePtr env, TrajectoryBasePtr traj=TrajectoryBasePtr(), const AttributesList &atts=AttributesList())
virtual ProcessElement startElement (const std::string &name, const AttributesList &atts)
virtual bool endElement (const std::string &name)
virtual void characters (const std::string &ch)
TrajectoryBasePtr GetTrajectory () const
- Public Member Functions inherited from OpenRAVE::BaseXMLReader
 BaseXMLReader ()
virtual ~BaseXMLReader ()
virtual XMLReadablePtr GetReadable ()

Protected Attributes

TrajectoryBasePtr _ptraj
std::stringstream _ss
ConfigurationSpecification _spec
BaseXMLReaderPtr _pcurreader
int _datacount
std::vector< dReal_vdata
bool _bInReadable

Additional Inherited Members

- Public Types inherited from OpenRAVE::BaseXMLReader
enum  ProcessElement { PE_Pass =0, PE_Support =1, PE_Ignore =2 }
- Public Attributes inherited from OpenRAVE::BaseXMLReader
std::string _filename
 XML filename/resource used for this class (can be empty)

Detailed Description

create a xml parser for trajectories

Definition at line 59 of file xmlreaders.h.

Constructor & Destructor Documentation

OpenRAVE::xmlreaders::TrajectoryReader::TrajectoryReader ( EnvironmentBasePtr  env,
TrajectoryBasePtr  traj = TrajectoryBasePtr(),
const AttributesList atts = AttributesList() 
envthe environment used to create the trajectory
trajcan optionally pass a trajectory to initialize if need to read into an existing trajectory, but the pointer can be empty
attsattributes passed from <trajectory> tag

Member Function Documentation

virtual void OpenRAVE::xmlreaders::TrajectoryReader::characters ( const std::string &  ch)

gets called for all data in between tags.

cha string to the data

Implements OpenRAVE::BaseXMLReader.

virtual bool OpenRAVE::xmlreaders::TrajectoryReader::endElement ( const std::string &  name)

Gets called at the end of each "</type>" expression. In this case, name is "type"

nameof the tag, will be always lower case
true if XMLReader has finished parsing (one condition is that name==_fieldname) , otherwise false

Implements OpenRAVE::BaseXMLReader.

TrajectoryBasePtr OpenRAVE::xmlreaders::TrajectoryReader::GetTrajectory ( ) const

Definition at line 70 of file xmlreaders.h.

virtual ProcessElement OpenRAVE::xmlreaders::TrajectoryReader::startElement ( const std::string &  name,
const AttributesList atts 

Gets called in the beginning of each "<type>" expression. In this case, name is "type"

nameof the tag, will be always lower case
attsstring of attributes where the first std::string is the attribute name and second is the value
true if tag is accepted and this class will process it, otherwise false

Implements OpenRAVE::BaseXMLReader.

Member Data Documentation

bool OpenRAVE::xmlreaders::TrajectoryReader::_bInReadable

Definition at line 81 of file xmlreaders.h.

int OpenRAVE::xmlreaders::TrajectoryReader::_datacount

Definition at line 79 of file xmlreaders.h.

BaseXMLReaderPtr OpenRAVE::xmlreaders::TrajectoryReader::_pcurreader

Definition at line 78 of file xmlreaders.h.

TrajectoryBasePtr OpenRAVE::xmlreaders::TrajectoryReader::_ptraj

Definition at line 75 of file xmlreaders.h.

ConfigurationSpecification OpenRAVE::xmlreaders::TrajectoryReader::_spec

Definition at line 77 of file xmlreaders.h.

std::stringstream OpenRAVE::xmlreaders::TrajectoryReader::_ss

Definition at line 76 of file xmlreaders.h.

std::vector<dReal> OpenRAVE::xmlreaders::TrajectoryReader::_vdata

Definition at line 80 of file xmlreaders.h.

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