Class for saving rw::core::PropertyMap to XML.
More...
#include <XMLPropertySaver.hpp>
Class for saving rw::core::PropertyMap to XML.
The class support saving all in rw::core::PropertyType defined types.
◆ createDOMDocument()
Creates DOMDocument for map.
IMPORTANT: Remember to call release on the returned DOMDocument
- Parameters
-
map | [in] Map of properties |
- Returns
- DOMDocument containing properties.
◆ save() [1/4]
Saves the properties of map to file named filename.
Throws rw::core::Exception if the type of a property is not supported.
- Parameters
-
map | [in] Map of properties to save |
filename | [in] Filename |
◆ save() [2/4]
Writes PropertyMap to a DOMElement.
Constructs a new DOMElement for the document doc and adds the properties in map to it.
Throws rw::core::Expcetion if the type of a property is not supported.
- Parameters
-
map | [in] Map of properties to save |
doc | [in] DOMDocument which should contain the properties |
- Returns
- DOMElement representing map and belonging to doc
◆ save() [3/4]
static void save |
( |
const rw::core::PropertyMap & |
map, |
|
|
xercesc::DOMElement * |
element, |
|
|
xercesc::DOMDocument * |
doc |
|
) |
| |
|
static |
Saves properties of a PropertyMap as childs to element.
Constructs element representing the properties in map and adds these as childs to element.
Throws rw::core::Expcetion if the type of a property is not supported.
- Parameters
-
map | [in] Map of properties to save. |
element | [in] Element to which properties should be stored as children. |
doc | [in] DOMDocument containing element and which should contain the individual properties |
◆ save() [4/4]
Writes a single property to a DOMElement.
Constructs a new DOMElement for the document doc and writes the property to it.
Throws rw::core::Exception if the type of the property is not supported.
- Parameters
-
property | [in] Property to save |
doc | [in] DOMDocument which should contain the property representation |
- Returns
- DOMElement representing property and belonging to doc.
◆ write()
Writes the properties of map to outstream.
Throws rw::core::Exception if the type of a property is not supported.
- Parameters
-
map | [in] Map of properties to save |
outstream | [in] Output stream |
The documentation for this class was generated from the following file: