openrave.org

 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
[legend]
Collaboration diagram for OpenRAVE::xmlreaders::TrajectoryReader:
Collaboration graph
[legend]

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() 
)
Parameters
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)
virtual

gets called for all data in between tags.

Parameters
cha string to the data

Implements OpenRAVE::BaseXMLReader.

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

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

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

Implements OpenRAVE::BaseXMLReader.

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

Definition at line 70 of file xmlreaders.h.

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

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

Parameters
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
Returns
true if tag is accepted and this class will process it, otherwise false

Implements OpenRAVE::BaseXMLReader.

Member Data Documentation

bool OpenRAVE::xmlreaders::TrajectoryReader::_bInReadable
protected

Definition at line 81 of file xmlreaders.h.

int OpenRAVE::xmlreaders::TrajectoryReader::_datacount
protected

Definition at line 79 of file xmlreaders.h.

BaseXMLReaderPtr OpenRAVE::xmlreaders::TrajectoryReader::_pcurreader
protected

Definition at line 78 of file xmlreaders.h.

TrajectoryBasePtr OpenRAVE::xmlreaders::TrajectoryReader::_ptraj
protected

Definition at line 75 of file xmlreaders.h.

ConfigurationSpecification OpenRAVE::xmlreaders::TrajectoryReader::_spec
protected

Definition at line 77 of file xmlreaders.h.

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

Definition at line 76 of file xmlreaders.h.

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

Definition at line 80 of file xmlreaders.h.


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