![]() |
RobWorkProject
25.2.11-
|
Utility class to help read in the content of a XML-files parsed with Xerces The Class is part of the core Library in a limited edition. Use DOMBasisTypes for a full implementation. More...
#include <DOMCoreBasisTypes.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 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 | 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 | 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... | |
Utility class to help read in the content of a XML-files parsed with Xerces The Class is part of the core Library in a limited edition. Use DOMBasisTypes for a full implementation.
|
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
value | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
value | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
doubles | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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.
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 |
|
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
value | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
value | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
ints | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
string | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
strings | [in] Value to represent |
doc | [in] Document which should contain the element |
|
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
first | [in] First string in the pair |
second | [in] Second string in the pair |
doc | [in] Document which should contain the element |
|
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
key | [in] The key for which the get the unit |
|
static |
Identifier for specifying the angular part in a VelocityScrew6D.
|
static |
Identifier for specifying a boolean.
|
static |
Identifier for a Box.
|
static |
Identifier for a Cone.
|
static |
Identifier for a Cylinder.
|
static |
Identifier for specifying a double.
|
static |
Identifier for specifying a list of doubles.
|
static |
Identifier for rw::math::EAA<> in the XML format.
|
static |
Identifier for specifying a float.
|
static |
Identifier for specifying an integer.
|
static |
Identifier for specifying a list of integers.
|
static |
Identifier for specifying the linear part in a VelocityScrew6D.
|
static |
Identifier for rw::math::MatrixXd<> in the XML format.
|
static |
Identifier for a Plane.
|
static |
Identifier for the position specification used in Transform3D.
|
static |
Identifier for rw::math::Q in the XML format.
|
static |
Identifier for specifying a State.
|
static |
Identifier for rw::math::Quaternion<> in the XML format.
|
static |
Identifier for rw::math::Rotation2D<> in the XML format.
|
static |
Identifier for single angle used to specify rw::math::Rotation2D<> in the XML format.
|
static |
Identifier for rw::math::Rotation3D<> in the XML format.
|
static |
Identifier for rw::math::RPY<> in the XML format.
|
static |
Identifier for a Sphere.
|
static |
Identifier for specifying a State.
|
static |
Identifier for specifying a string.
|
static |
Identifier for specifying a list of strings.
|
static |
Identifier for specifying a pair of strings.
|
static |
Identifier for rw::math::Transform2D<> in the XML format.
|
static |
Identifier for rw::math::Transform3D<> in the XML format.
|
static |
Identifier for specifying a State.
|
static |
Identifier for a Tube.
|
static |
Identifier for the unit attribute.
|
static |
Identifier for rw::math::Vector2D<> in the XML format.
|
static |
Identifier for rw::math::Vector3D<> in the XML format.
|
static |
Identifier for rw::math::VelocityScrew6D<> in the XML format.
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element to read in |
doCheckHeader | [in] True if the element name should be checked |
|
static |
Reads in a string element.
Reads in element as a string element. Throws a rw::core::Exception on error
element | [in] Element to parse |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element which string pairs as children |
|
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.
element | [in] Element to read |
doCheckHeader | [in] True if the element name should be checked |
|
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.
element | [in] Element which string pairs as children |
|
static |
Writes str to elem.
str | [in] Value to write |
elem | [in] Element to which to write |
addHeader | [in] Whether or not to set the header of elem |
|
static |
Writes val to elem.
val | [in] Value to write |
elem | [in] Element to which to write |
addHeader | [in] Whether or not to set the header of elem |
|
static |
Writes val to elem.
val | [in] Value to write |
elem | [in] Element to which to write |
addHeader | [in] Whether or not to set the header of elem |