RobWorkProject  23.9.11-
Public Types | Static Public Member Functions | List of all members
XML Class Reference

#include <XML.hpp>

Public Types

typedef boost::property_tree::ptree PTree
 type of property tree
 

Static Public Member Functions

static math::Vector3D readVector3D (const PTree &tree)
 
static math::Rotation3D readRotation3D (const PTree &tree)
 
static math::Transform3D readTransform3D (const PTree &tree)
 
static math::Q readQ (const PTree &tree)
 
static void readPropertyMap (const PTree &tree, core::PropertyMap &properties)
 
static void printTree (const PTree &tree, std::ostream &out)
 Print a formatted version of the tree to out. More...
 

Detailed Description

   @brief XML is a collection of procedures for reading RobWork data
   structures stored in an XML format.

   The data structures are read from an XML file loaded into a Boost
   property tree.

   Eventually this parsing of XML structures should be shared between
   workcell and task files.

   The parser assumes that the node with the relevant name has been entered.
   For example:
const Vector3D<> pos = XML::readVector3D(tree.get_child("Vector3D"));
static math::Vector3D readVector3D(const PTree &tree)

Member Function Documentation

◆ printTree()

static void printTree ( const PTree tree,
std::ostream &  out 
)
static

Print a formatted version of the tree to out.

This utility is useful for figuring out how the XML representation corresponds to the property tree.

◆ readPropertyMap()

static void readPropertyMap ( const PTree tree,
core::PropertyMap properties 
)
static
<property-map> ::= PropertyMap <property> ...
<property> ::=
    Property
        (Key <string>)
        <description>?
        (<string> | <number> | <vector3d> | <rotation3d> | <transform3d> | <q>)

◆ readQ()

static math::Q readQ ( const PTree tree)
static
<q> ::= Q <number> ... <number>

◆ readRotation3D()

static math::Rotation3D readRotation3D ( const PTree tree)
static
<rotation3d> ::=
    RPY <number> <number> <number> |
    Rotation3D
        <number> <number> <number>
        <number> <number> <number>
        <number> <number> <number>

◆ readTransform3D()

static math::Transform3D readTransform3D ( const PTree tree)
static
<transform3d> ::= Transform3D <vector3d> <rotation3d>

◆ readVector3D()

static math::Vector3D readVector3D ( const PTree tree)
static
<vector3d> ::= Vector3D <number> <number> <number>

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