RobWorkProject  24.5.15-
Classes | Static Public Member Functions | List of all members
DOMBasisTypes Class Reference

Utility class to help read in the content of a XML-files parsed with Xerces. More...

#include <DOMBasisTypes.hpp>

Classes

class  Initializer
 Utility class which initializes local static variables. More...
 

Static Public Member Functions

static const std::string & idQ ()
 Identifier for rw::math::Q in the XML format. More...
 
static const std::string & idVector3D ()
 Identifier for rw::math::Vector3D<> in the XML format. More...
 
static const std::string & idVector2D ()
 Identifier for rw::math::Vector2D<> in the XML format. More...
 
static const std::string & idRotation3D ()
 Identifier for rw::math::Rotation3D<> in the XML format. More...
 
static const std::string & idRPY ()
 Identifier for rw::math::RPY<> in the XML format. More...
 
static const std::string & idEAA ()
 Identifier for rw::math::EAA<> in the XML format. More...
 
static const std::string & idQuaternion ()
 Identifier for rw::math::Quaternion<> in the XML format. More...
 
static const std::string & idRotation2D ()
 Identifier for rw::math::Rotation2D<> in the XML format. More...
 
static const std::string & idRotation2DAngle ()
 Identifier for single angle used to specify rw::math::Rotation2D<> in the XML format. More...
 
static const std::string & idTransform2D ()
 Identifier for rw::math::Transform2D<> in the XML format. More...
 
static const std::string & idTransform3D ()
 Identifier for rw::math::Transform3D<> in the XML format. More...
 
static const std::string & idMatrix ()
 Identifier for rw::math::MatrixXd<> in the XML format. More...
 
static const std::string & idVelocityScrew6D ()
 Identifier for rw::math::VelocityScrew6D<> in the XML format. More...
 
static const std::string & idPos ()
 Identifier for the position specification used in Transform3D. More...
 
static const std::string & idLinear ()
 Identifier for specifying the linear part in a VelocityScrew6D. More...
 
static const std::string & idAngular ()
 Identifier for specifying the angular part in a VelocityScrew6D. More...
 
static const std::string & idState ()
 Identifier for specifying a State. More...
 
static const std::string & idQState ()
 Identifier for specifying a State. More...
 
static const std::string & idTreeState ()
 Identifier for specifying a State. More...
 
static const std::string & idBoolean ()
 Identifier for specifying a boolean. More...
 
static const std::string & idDouble ()
 Identifier for specifying a double. More...
 
static const std::string & idFloat ()
 Identifier for specifying a float. More...
 
static const std::string & idInteger ()
 Identifier for specifying an integer. More...
 
static const std::string & idString ()
 Identifier for specifying a string. More...
 
static const std::string & idStringList ()
 Identifier for specifying a list of strings. More...
 
static const std::string & idIntList ()
 Identifier for specifying a list of integers. More...
 
static const std::string & idDoubleList ()
 Identifier for specifying a list of doubles. More...
 
static const std::string & idStringPair ()
 Identifier for specifying a pair of strings. More...
 
static const std::string & idUnitAttribute ()
 Identifier for the unit attribute. More...
 
static const std::string & idPlane ()
 Identifier for a Plane. More...
 
static const std::string & idBox ()
 Identifier for a Box. More...
 
static const std::string & idSphere ()
 Identifier for a Sphere. More...
 
static const std::string & idCone ()
 Identifier for a Cone. More...
 
static const std::string & idCylinder ()
 Identifier for a Cylinder. More...
 
static const std::string & idTube ()
 Identifier for a Tube. More...
 
static double getUnit (const std::string key)
 Returns the conversion value for a given unit. More...
 
static rw::math::Q readQ (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Q element read from element. More...
 
static rw::math::Vector3D readVector3D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Vector3D<> element read from element. More...
 
static rw::math::Vector2D readVector2D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Vector2D<> element read from element. More...
 
static rw::math::RPY readRPY (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::RPY<> element read from element. More...
 
static rw::math::EAA readEAA (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::EAA<> element read from element. More...
 
static rw::math::Quaternion readQuaternion (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Quaternion<> element read from element. More...
 
static rw::math::Rotation3D readRotation3D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Rotation3D<> element read from element. More...
 
static rw::math::Rotation3D readRotation3DStructure (rw::core::DOMElem::Ptr element)
 Returns rw::math::Rotation3D<> element read from element. More...
 
static rw::math::Rotation2D readRotation2D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Rotation2D<> element read from element. More...
 
static rw::math::Rotation2D readRotation2DStructure (rw::core::DOMElem::Ptr element)
 Returns rw::math::Rotation2D<> element read from element. More...
 
static rw::math::Transform3D readTransform3D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Transform3D<> element read from element. More...
 
static rw::math::Transform2D readTransform2D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::Transform2D<> element read from element. More...
 
static rw::math::VelocityScrew6D readVelocityScrew6D (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns rw::math::VelocityScrew6D<> element read from element. More...
 
static rw::kinematics::State readState (rw::core::DOMElem::Ptr element, rw::core::Ptr< rw::models::WorkCell > workcell, bool doCheckHeader=false)
 Returns rw::kinematics::State<> element read from element. More...
 
static std::pair< std::string, std::string > readStringPair (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Returns pair of strings from element. More...
 
static std::vector< std::pair< std::string, std::string > > readStringPairs (rw::core::DOMElem::Ptr element)
 Reads in a list of string pairs that are childs of element. More...
 
static std::vector< std::string > readStringList (rw::core::DOMElem::Ptr element)
 Reads in a list of strings that are childs of element. More...
 
static std::string readString (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a string element. More...
 
static double readDouble (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a double element. More...
 
static float readFloat (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a double element. More...
 
static int readInt (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in an integer element. More...
 
static std::vector< int > readIntList (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a list of integers from element. More...
 
static std::vector< double > readDoubleList (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a list of doubles from element. More...
 
static bool readBool (rw::core::DOMElem::Ptr element, bool doCheckHeader=false)
 Reads in a boolean element. More...
 
static rw::core::DOMElem::Ptr write (int val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes val to elem. More...
 
static rw::core::DOMElem::Ptr write (double val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes val to elem. More...
 
static rw::core::DOMElem::Ptr write (const std::string &str, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes str to elem. More...
 
static rw::core::DOMElem::Ptr write (const rw::math::Q &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static rw::core::DOMElem::Ptr write (const rw::math::Vector3D<> &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static rw::core::DOMElem::Ptr write (const rw::math::Vector2D<> &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static rw::core::DOMElem::Ptr write (const rw::math::Transform2D<> &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static rw::core::DOMElem::Ptr write (const rw::math::Transform3D<> &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static rw::core::DOMElem::Ptr write (const Eigen::MatrixXd &val, rw::core::DOMElem::Ptr elem, bool addHeader=true)
 Writes the content of val to elem. More...
 
static Eigen::MatrixXd readMatrix (rw::core::DOMElem::Ptr elem)
 Reads in a matrix from element. More...
 
static rw::core::DOMElem::Ptr createElement (const std::string &id, const std::string &value, rw::core::DOMElem::Ptr doc)
 Create an element with name id and content value in the DOMDocument doc. More...
 
static rw::core::DOMElem::Ptr createQ (const rw::math::Q &q, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent q. More...
 
static rw::core::DOMElem::Ptr createVector3D (const rw::math::Vector3D<> &v, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent v. More...
 
static rw::core::DOMElem::Ptr createPos (const rw::math::Vector3D<> &v, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent v. More...
 
static rw::core::DOMElem::Ptr createVector2D (const rw::math::Vector2D<> &v, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent v. More...
 
static rw::core::DOMElem::Ptr createRPY (const rw::math::RPY<> &rpy, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent rpy. More...
 
static rw::core::DOMElem::Ptr createEAA (const rw::math::EAA<> &eaa, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent eaa. More...
 
static rw::core::DOMElem::Ptr createQuaternion (const rw::math::Quaternion<> &quat, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent quat. More...
 
static rw::core::DOMElem::Ptr createRotation3D (const rw::math::Rotation3D<> &rot, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent rot. More...
 
static rw::core::DOMElem::Ptr createRotation2D (const rw::math::Rotation2D<> &rot, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent rot. More...
 
static rw::core::DOMElem::Ptr createTransform3D (const rw::math::Transform3D<> &trans, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent trans. More...
 
static rw::core::DOMElem::Ptr createTransform2D (const rw::math::Transform2D<> &trans, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent trans. More...
 
static rw::core::DOMElem::Ptr createVelocityScrew6D (const rw::math::VelocityScrew6D<> &vs, rw::core::DOMElem::Ptr doc)
 Creates a DOMElement to represent vs. More...
 
static rw::core::DOMElem::Ptr createState (const rw::kinematics::State &state, rw::core::DOMElem::Ptr doc)
 Creates an element to represent state. More...
 
static rw::core::DOMElem::Ptr createQState (const rw::kinematics::State &state, rw::core::DOMElem::Ptr doc)
 Creates an element to represent the rw::kinematics::QState contained in state. More...
 
static rw::core::DOMElem::Ptr createTreeState (const rw::kinematics::State &state, rw::core::DOMElem::Ptr doc)
 Creates an element to represent the rw::kinematics::TreeState contained in state. More...
 
static rw::core::DOMElem::Ptr createBoolean (bool value, rw::core::DOMElem::Ptr doc)
 Creates an element to represent value. More...
 
static rw::core::DOMElem::Ptr createDouble (double value, rw::core::DOMElem::Ptr doc)
 Creates an element to represent value. More...
 
static rw::core::DOMElem::Ptr createFloat (float value, rw::core::DOMElem::Ptr doc)
 Creates an element to represent value. More...
 
static rw::core::DOMElem::Ptr createInteger (int value, rw::core::DOMElem::Ptr doc)
 Creates an element to represent value. More...
 
static rw::core::DOMElem::Ptr createString (const std::string &string, rw::core::DOMElem::Ptr doc)
 Creates an element to represent string. More...
 
static rw::core::DOMElem::Ptr createStringList (const std::vector< std::string > &strings, rw::core::DOMElem::Ptr doc)
 Creates an element to represent strings. More...
 
static rw::core::DOMElem::Ptr createIntList (const std::vector< int > &ints, rw::core::DOMElem::Ptr doc)
 Creates an element to represent ints. More...
 
static rw::core::DOMElem::Ptr createDoubleList (const std::vector< double > &doubles, rw::core::DOMElem::Ptr doc)
 Creates an element to represent doubles. More...
 
static rw::core::DOMElem::Ptr createStringPair (const std::string &first, const std::string &second, rw::core::DOMElem::Ptr doc)
 Creates an element to represent strings first and second. More...
 

Detailed Description

Utility class to help read in the content of a XML-files parsed with Xerces.

Member Function Documentation

◆ createBoolean()

static rw::core::DOMElem::Ptr createBoolean ( bool  value,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent value.

Creates a DOMElement owned by doc and representing value

The method may throw a rw::core::Exception in case of errors

Parameters
value[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createDouble()

static rw::core::DOMElem::Ptr createDouble ( double  value,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent value.

Creates a DOMElement owned by doc and representing value

The method may throw a rw::core::Exception in case of errors

Parameters
value[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createDoubleList()

static rw::core::DOMElem::Ptr createDoubleList ( const std::vector< double > &  doubles,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent doubles.

Creates a DOMElement owned by doc and representing doubles

The method may throw a rw::core::Exception in case of errors

Parameters
doubles[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createEAA()

static rw::core::DOMElem::Ptr createEAA ( const rw::math::EAA<> &  eaa,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent eaa.

Creates a DOMElement owned by doc and representing eaa

This method may throw a rw::core::Exception in case of errors

Parameters
eaa[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createElement()

static rw::core::DOMElem::Ptr createElement ( const std::string &  id,
const std::string &  value,
rw::core::DOMElem::Ptr  doc 
)
static

Create an element with name id and content value in the DOMDocument doc.

Create an element named id and adds a DOMText-node containing value as a child to it.

Parameters
id[in] Name of the new element
value[in] Text value of the new element
doc[in] Document for which the new element shall be created
Returns
The new element.

◆ createFloat()

static rw::core::DOMElem::Ptr createFloat ( float  value,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent value.

Creates a DOMElement owned by doc and representing value

The method may throw a rw::core::Exception in case of errors

Parameters
value[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createInteger()

static rw::core::DOMElem::Ptr createInteger ( int  value,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent value.

Creates a DOMElement owned by doc and representing value

The method may throw a rw::core::Exception in case of errors

Parameters
value[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createIntList()

static rw::core::DOMElem::Ptr createIntList ( const std::vector< int > &  ints,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent ints.

Creates a DOMElement owned by doc and representing ints

The method may throw a rw::core::Exception in case of errors

Parameters
ints[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createPos()

static rw::core::DOMElem::Ptr createPos ( const rw::math::Vector3D<> &  v,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent v.

Creates a DOMElement owned by doc and representing v

This method may throw a rw::core::Exception in case of errors

Parameters
v[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createQ()

static rw::core::DOMElem::Ptr createQ ( const rw::math::Q q,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent q.

Creates a DOMElement owned by doc and representing q

This method may throw a rw::core::Exception in case of errors

Parameters
q[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createQState()

static rw::core::DOMElem::Ptr createQState ( const rw::kinematics::State state,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent the rw::kinematics::QState contained in state.

Creates a DOMElement owned by doc and representing the rw::kinematics::QState contained in state

The method may throw a rw::core::Exception in case of errors

Parameters
state[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createQuaternion()

static rw::core::DOMElem::Ptr createQuaternion ( const rw::math::Quaternion<> &  quat,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent quat.

Creates a DOMElement owned by doc and representing quat

This method may throw a rw::core::Exception in case of errors

Parameters
quat[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createRotation2D()

static rw::core::DOMElem::Ptr createRotation2D ( const rw::math::Rotation2D<> &  rot,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent rot.

Creates a DOMElement owned by doc and representing rot

This method may throw a rw::core::Exception in case of errors

Parameters
rot[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createRotation3D()

static rw::core::DOMElem::Ptr createRotation3D ( const rw::math::Rotation3D<> &  rot,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent rot.

Creates a DOMElement owned by doc and representing rot

This method may throw a rw::core::Exception in case of errors

Parameters
rot[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createRPY()

static rw::core::DOMElem::Ptr createRPY ( const rw::math::RPY<> &  rpy,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent rpy.

Creates a DOMElement owned by doc and representing rpy

This method may throw a rw::core::Exception in case of errors

Parameters
rpy[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createState()

static rw::core::DOMElem::Ptr createState ( const rw::kinematics::State state,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent state.

Creates a DOMElement owned by doc and representing state

The method may throw a rw::core::Exception in case of errors

Parameters
state[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createString()

static rw::core::DOMElem::Ptr createString ( const std::string &  string,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent string.

Creates a DOMElement owned by doc and representing string

The method may throw a rw::core::Exception in case of errors

Parameters
string[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createStringList()

static rw::core::DOMElem::Ptr createStringList ( const std::vector< std::string > &  strings,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent strings.

Creates a DOMElement owned by doc and representing strings

The method may throw a rw::core::Exception in case of errors

Parameters
strings[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createStringPair()

static rw::core::DOMElem::Ptr createStringPair ( const std::string &  first,
const std::string &  second,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent strings first and second.

Creates a DOMElement owned by doc and representing strings first and second

The method may throw a rw::core::Exception in case of errors

Parameters
first[in] First string in the pair
second[in] Second string in the pair
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createTransform2D()

static rw::core::DOMElem::Ptr createTransform2D ( const rw::math::Transform2D<> &  trans,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent trans.

Creates a DOMElement owned by doc and representing trans

This method may throw a rw::comon::Exception in case of errors

Parameters
trans[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createTransform3D()

static rw::core::DOMElem::Ptr createTransform3D ( const rw::math::Transform3D<> &  trans,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent trans.

Creates a DOMElement owned by doc and representing trans

This method may throw a rw::comon::Exception in case of errors

Parameters
trans[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createTreeState()

static rw::core::DOMElem::Ptr createTreeState ( const rw::kinematics::State state,
rw::core::DOMElem::Ptr  doc 
)
static

Creates an element to represent the rw::kinematics::TreeState contained in state.

Creates a DOMElement owned by doc and representing the rw::kinematics::QState contained in state

The method may throw a rw::core::Exception in case of errors

Parameters
state[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createVector2D()

static rw::core::DOMElem::Ptr createVector2D ( const rw::math::Vector2D<> &  v,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent v.

Creates a DOMElement owned by doc and representing v

This method may throw a rw::core::Exception in case of errors

Parameters
v[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createVector3D()

static rw::core::DOMElem::Ptr createVector3D ( const rw::math::Vector3D<> &  v,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent v.

Creates a DOMElement owned by doc and representing v

This method may throw a rw::core::Exception in case of errors

Parameters
v[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ createVelocityScrew6D()

static rw::core::DOMElem::Ptr createVelocityScrew6D ( const rw::math::VelocityScrew6D<> &  vs,
rw::core::DOMElem::Ptr  doc 
)
static

Creates a DOMElement to represent vs.

Creates a DOMElement owned by doc and representing vs

This method may throw a rw::core::Exception in case of errors

Parameters
vs[in] Value to represent
doc[in] Document which should contain the element
Returns
Pointer to the newly created DOMElement

◆ getUnit()

static double getUnit ( const std::string  key)
static

Returns the conversion value for a given unit.

The value returned can be used to convert the values specified in the element to the standard units used in RobWork.

Throws an exception if key cannot be matched to a unit

Parameters
key[in] The key for which the get the unit
Returns
Conversion value

◆ idAngular()

static const std::string& idAngular ( )
static

Identifier for specifying the angular part in a VelocityScrew6D.

Returns
the identifier.

◆ idBoolean()

static const std::string& idBoolean ( )
static

Identifier for specifying a boolean.

Returns
the identifier.

◆ idBox()

static const std::string& idBox ( )
static

Identifier for a Box.

Returns
the identifier.

◆ idCone()

static const std::string& idCone ( )
static

Identifier for a Cone.

Returns
the identifier.

◆ idCylinder()

static const std::string& idCylinder ( )
static

Identifier for a Cylinder.

Returns
the identifier.

◆ idDouble()

static const std::string& idDouble ( )
static

Identifier for specifying a double.

Returns
the identifier.

◆ idDoubleList()

static const std::string& idDoubleList ( )
static

Identifier for specifying a list of doubles.

Returns
the identifier.

◆ idEAA()

static const std::string& idEAA ( )
static

Identifier for rw::math::EAA<> in the XML format.

Returns
the identifier.

◆ idFloat()

static const std::string& idFloat ( )
static

Identifier for specifying a float.

Returns
the identifier.

◆ idInteger()

static const std::string& idInteger ( )
static

Identifier for specifying an integer.

Returns
the identifier.

◆ idIntList()

static const std::string& idIntList ( )
static

Identifier for specifying a list of integers.

Returns
the identifier.

◆ idLinear()

static const std::string& idLinear ( )
static

Identifier for specifying the linear part in a VelocityScrew6D.

Returns
the identifier.

◆ idMatrix()

static const std::string& idMatrix ( )
static

Identifier for rw::math::MatrixXd<> in the XML format.

Returns
the identifier.

◆ idPlane()

static const std::string& idPlane ( )
static

Identifier for a Plane.

Returns
the identifier.

◆ idPos()

static const std::string& idPos ( )
static

Identifier for the position specification used in Transform3D.

Returns
the identifier.

◆ idQ()

static const std::string& idQ ( )
static

Identifier for rw::math::Q in the XML format.

Returns
the identifier.

◆ idQState()

static const std::string& idQState ( )
static

Identifier for specifying a State.

Returns
the identifier.

◆ idQuaternion()

static const std::string& idQuaternion ( )
static

Identifier for rw::math::Quaternion<> in the XML format.

Returns
the identifier.

◆ idRotation2D()

static const std::string& idRotation2D ( )
static

Identifier for rw::math::Rotation2D<> in the XML format.

Returns
the identifier.

◆ idRotation2DAngle()

static const std::string& idRotation2DAngle ( )
static

Identifier for single angle used to specify rw::math::Rotation2D<> in the XML format.

Returns
the identifier.

◆ idRotation3D()

static const std::string& idRotation3D ( )
static

Identifier for rw::math::Rotation3D<> in the XML format.

Returns
the identifier.

◆ idRPY()

static const std::string& idRPY ( )
static

Identifier for rw::math::RPY<> in the XML format.

Returns
the identifier.

◆ idSphere()

static const std::string& idSphere ( )
static

Identifier for a Sphere.

Returns
the identifier.

◆ idState()

static const std::string& idState ( )
static

Identifier for specifying a State.

Returns
the identifier.

◆ idString()

static const std::string& idString ( )
static

Identifier for specifying a string.

Returns
the identifier.

◆ idStringList()

static const std::string& idStringList ( )
static

Identifier for specifying a list of strings.

Returns
the identifier.

◆ idStringPair()

static const std::string& idStringPair ( )
static

Identifier for specifying a pair of strings.

Returns
the identifier.

◆ idTransform2D()

static const std::string& idTransform2D ( )
static

Identifier for rw::math::Transform2D<> in the XML format.

Returns
the identifier.

◆ idTransform3D()

static const std::string& idTransform3D ( )
static

Identifier for rw::math::Transform3D<> in the XML format.

Returns
the identifier.

◆ idTreeState()

static const std::string& idTreeState ( )
static

Identifier for specifying a State.

Returns
the identifier.

◆ idTube()

static const std::string& idTube ( )
static

Identifier for a Tube.

Returns
the identifier.
the identifier.

◆ idUnitAttribute()

static const std::string& idUnitAttribute ( )
static

Identifier for the unit attribute.

Returns
the identifier.

◆ idVector2D()

static const std::string& idVector2D ( )
static

Identifier for rw::math::Vector2D<> in the XML format.

Returns
the identifier.

◆ idVector3D()

static const std::string& idVector3D ( )
static

Identifier for rw::math::Vector3D<> in the XML format.

Returns
the identifier.

◆ idVelocityScrew6D()

static const std::string& idVelocityScrew6D ( )
static

Identifier for rw::math::VelocityScrew6D<> in the XML format.

Returns
the identifier.

◆ readBool()

static bool readBool ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a boolean element.

Read in element and converts the content to a bool. Only if the content of the node equals "true" is true returned. Otherwise the method returns false.

Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
bool represented in element

◆ readDouble()

static double readDouble ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a double element.

Read in element and converts the content to a double Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
double represented in element

◆ readDoubleList()

static std::vector<double> readDoubleList ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a list of doubles from element.

Read in element and converts the content to a list of doubles Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
std::vector<double> represented in element

◆ readEAA()

static rw::math::EAA readEAA ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::EAA<> element read from element.

Read in element and returns a rw::math::EAA<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches EAA. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readFloat()

static float readFloat ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a double element.

Read in element and converts the content to a double Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
double represented in element

◆ readInt()

static int readInt ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in an integer element.

Read in element and converts the content to an integer Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
int represented in element

◆ readIntList()

static std::vector<int> readIntList ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a list of integers from element.

Read in element and converts the content to a list of integers Throws a rw::core::Exception if failing to read or parse.

Parameters
element[in] Element to read in
doCheckHeader[in] True if the element name should be checked
Returns
std::vector<int> represented in element

◆ readMatrix()

static Eigen::MatrixXd readMatrix ( rw::core::DOMElem::Ptr  elem)
static

Reads in a matrix from element.

Parameters
elem[in] The element from which to read
Returns
Eigen matrix

◆ readQ()

static rw::math::Q readQ ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Q element read from element.

Read in element and returns a rw::math::Q corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches QId. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readQuaternion()

static rw::math::Quaternion readQuaternion ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Quaternion<> element read from element.

Read in element and returns a rw::math::Quaternion<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Quaternion. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readRotation2D()

static rw::math::Rotation2D readRotation2D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Rotation2D<> element read from element.

Read in element and returns a rw::math::Rotation2D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Rotation2D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readRotation2DStructure()

static rw::math::Rotation2D readRotation2DStructure ( rw::core::DOMElem::Ptr  element)
static

Returns rw::math::Rotation2D<> element read from element.

Read in element and returns a rw::math::Rotation2D corresponding to the content. The content can be either a Rotation3D or and angle. If the name does not an exception is thrown.

Parameters
element[in] Element to read
Returns
The element read

◆ readRotation3D()

static rw::math::Rotation3D readRotation3D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Rotation3D<> element read from element.

Read in element and returns a rw::math::Rotation3D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Rotation3D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readRotation3DStructure()

static rw::math::Rotation3D readRotation3DStructure ( rw::core::DOMElem::Ptr  element)
static

Returns rw::math::Rotation3D<> element read from element.

Read in element and returns a rw::math::Rotation3D corresponding to the content. The content can be either a RPY, EAA, Quaternion or Rotation3D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
Returns
The element read

◆ readRPY()

static rw::math::RPY readRPY ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::RPY<> element read from element.

Read in element and returns a rw::math::RPY<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches RPY. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readState()

static rw::kinematics::State readState ( rw::core::DOMElem::Ptr  element,
rw::core::Ptr< rw::models::WorkCell workcell,
bool  doCheckHeader = false 
)
static

Returns rw::kinematics::State<> element read from element.

Reads in element and returns a rw::kinematics::State corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches State. If the name does not an exception is thrown. If the structure of the state does not match an exception is thrown.

Parameters
element[in] Element to read
workcell[in] WorkCell to which the state should match.
doCheckHeader[in] True if the header name should be checked
Returns
The State read from element

◆ readString()

static std::string readString ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Reads in a string element.

Reads in element as a string element. Throws a rw::core::Exception on error

Parameters
element[in] Element to parse
doCheckHeader[in] True if the element name should be checked
Returns
String giving the content of element

◆ readStringList()

static std::vector<std::string> readStringList ( rw::core::DOMElem::Ptr  element)
static

Reads in a list of strings that are childs of element.

Reads in all strings which are childs of the element element.

Throws rw::core::Exception if failing to read and parse content.

Parameters
element[in] Element which string pairs as children
Returns
List of strings

◆ readStringPair()

static std::pair<std::string, std::string> readStringPair ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns pair of strings from element.

Reads in element and returns a pair of strings. If doCheckHeader = true it checks that the element tag name matches XMLBasicTypes::StringPairId. Throws a rw::core::Exception if header does not match or if failing to read two strings.

Parameters
element[in] Element to read
doCheckHeader[in] True if the element name should be checked
Returns
Pair of strings

◆ readStringPairs()

static std::vector<std::pair<std::string, std::string> > readStringPairs ( rw::core::DOMElem::Ptr  element)
static

Reads in a list of string pairs that are childs of element.

Reads in all string pairs which are childs of the element element. This is for example used when reading in DAF setups.

Throws rw::core::Exception if failing to read and parse content.

Parameters
element[in] Element which string pairs as children
Returns
List of string pairs

◆ readTransform2D()

static rw::math::Transform2D readTransform2D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Transform2D<> element read from element.

Read in element and returns a rw::math::Transform2D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Transform2D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readTransform3D()

static rw::math::Transform3D readTransform3D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Transform3D<> element read from element.

Read in element and returns a rw::math::Transform3D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Transform3D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readVector2D()

static rw::math::Vector2D readVector2D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Vector2D<> element read from element.

Read in element and returns a rw::math::Vector2D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Vector2D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readVector3D()

static rw::math::Vector3D readVector3D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::Vector3D<> element read from element.

Read in element and returns a rw::math::Vector3D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches Vector3D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ readVelocityScrew6D()

static rw::math::VelocityScrew6D readVelocityScrew6D ( rw::core::DOMElem::Ptr  element,
bool  doCheckHeader = false 
)
static

Returns rw::math::VelocityScrew6D<> element read from element.

Read in element and returns a rw::math::VelocityScrew6D<> corresponding to the content. If doCheckHeader = true it checks that the elements tag name matches VelocityScrew6D. If the name does not an exception is thrown.

Parameters
element[in] Element to read
doCheckHeader[in] True if the header name should be checked
Returns
The element read

◆ write() [1/9]

static rw::core::DOMElem::Ptr write ( const Eigen::MatrixXd &  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [2/9]

static rw::core::DOMElem::Ptr write ( const rw::math::Q val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [3/9]

static rw::core::DOMElem::Ptr write ( const rw::math::Transform2D<> &  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [4/9]

static rw::core::DOMElem::Ptr write ( const rw::math::Transform3D<> &  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [5/9]

static rw::core::DOMElem::Ptr write ( const rw::math::Vector2D<> &  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [6/9]

static rw::core::DOMElem::Ptr write ( const rw::math::Vector3D<> &  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes the content of val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [7/9]

static rw::core::DOMElem::Ptr write ( const std::string &  str,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes str to elem.

Parameters
str[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [8/9]

static rw::core::DOMElem::Ptr write ( double  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

◆ write() [9/9]

static rw::core::DOMElem::Ptr write ( int  val,
rw::core::DOMElem::Ptr  elem,
bool  addHeader = true 
)
static

Writes val to elem.

Parameters
val[in] Value to write
elem[in] Element to which to write
addHeader[in] Whether or not to set the header of elem
Returns
newly created DOMElem

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