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

Class for saving rw::proximity::ProximitySetup to XML. More...

#include <DOMProximitySetupSaver.hpp>

Classes

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

Static Public Member Functions

static void save (const rw::proximity::ProximitySetup &prox, rw::core::Ptr< rw::core::DOMElem > parent)
 Saves proximity setup patterns of a ProximitySetup as children to parent. More...
 
static void save (const rw::proximity::ProximitySetup &prox, const std::string &filename)
 Saves the proximity setup prox to a file named filename. More...
 
static void write (const rw::proximity::ProximitySetup &prox, std::ostream &outstream)
 Writes the proximity setup prox to outstream. More...
 
static rw::core::Ptr< rw::core::DOMElemcreateDOMDocument (const rw::proximity::ProximitySetup &prox, rw::core::Ptr< rw::core::DOMParser > parser)
 Creates DOMDocument for prox. More...
 

Detailed Description

Class for saving rw::proximity::ProximitySetup to XML.

Implemented using RobWork DOM parser abstraction.

Member Function Documentation

◆ createDOMDocument()

static rw::core::Ptr<rw::core::DOMElem> createDOMDocument ( const rw::proximity::ProximitySetup prox,
rw::core::Ptr< rw::core::DOMParser parser 
)
static

Creates DOMDocument for prox.

Exceptions
rw::core::Exceptionif the type of a property is not supported.
Parameters
prox[in] ProximitySetup
parser[in] DOMParser to use
Returns
DOMDocument containing ProximitySetup.

◆ save() [1/2]

static void save ( const rw::proximity::ProximitySetup prox,
const std::string &  filename 
)
static

Saves the proximity setup prox to a file named filename.

Exceptions
rw::core::Exceptionif the type of a ProximitySetupRule is not supported.
Parameters
prox[in] ProximitySetup to save.
filename[in] Filename

◆ save() [2/2]

static void save ( const rw::proximity::ProximitySetup prox,
rw::core::Ptr< rw::core::DOMElem parent 
)
static

Saves proximity setup patterns of a ProximitySetup as children to parent.

Constructs element representing the include or exclude patterns defined in the proximity setup.

Exceptions
rw::core::Exceptionif the type of a ProximitySetupRule is not supported.
Parameters
prox[in] ProximitySetup to save.
parent[out] DOMDocument which should contain the ProximitySetup representation

◆ write()

static void write ( const rw::proximity::ProximitySetup prox,
std::ostream &  outstream 
)
static

Writes the proximity setup prox to outstream.

Parameters
prox[in] Proximity setup to save.
outstream[in] Output stream

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