COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
#include <XmlDoc.hpp>
Inherits XmlNode.
Public Member Functions | |
XmlDoc (const std::string &version=std::string(), const std::string &encoding=std::string()) | |
Creates an empty document. More... | |
XmlDoc (rapidxml::xml_document< char > *doc) | |
~XmlDoc () | |
void | set_version (const std::string &version) |
void | set_encoding (const std::string &encoding) |
std::string | version () const |
std::string | encoding () const |
Public Member Functions inherited from XmlNode | |
XmlNode () | |
XmlNode (rapidxml::xml_node< char > *impl) | |
~XmlNode () | |
XmlNode | add_node (const std::string &name, const std::string &value=std::string()) const |
void | set_attribute (const std::string &name, const std::string &value) |
std::string | attribute_value (const std::string &name) const |
void | set_name (const char *name) |
void | set_value (const char *value) |
bool | is_valid () const |
void | print (Uint nesting=0) const |
void | deep_copy (XmlNode &out) const |
Additional Inherited Members | |
Public Attributes inherited from XmlNode | |
rapidxml::xml_node< char > * | content |
Pointer to the underlying XML implementation. More... | |
Represents a XML document. A XML document is a special XML node that manages the memory. This class uses the Pimpl idiom. It hides the real XML implementation, which should never be used directly.
This memory management is implementation-dependent and should never be used directly.
Definition at line 36 of file XmlDoc.hpp.
XmlDoc | ( | const std::string & | version = std::string() , |
const std::string & | encoding = std::string() |
||
) |
Creates an empty document.
Definition at line 24 of file XmlDoc.cpp.
XmlDoc | ( | rapidxml::xml_document< char > * | doc | ) |
Builds a document from an existing document. A declaration node is added if it is not present in the provided document.
doc | Document on which the new XmlDoc object is based. |
~XmlDoc | ( | ) |
Destroys the XML document. All allocated memory is freed.
Definition at line 39 of file XmlDoc.cpp.
std::string encoding | ( | ) | const |
Gives the document encoding.
Definition at line 95 of file XmlDoc.cpp.
void set_encoding | ( | const std::string & | encoding | ) |
Sets the encoding of the XML document. The encoding is stored as attribute in the declaration node ("<?xml ...>"). If the node or the attribute does not exist yet, it is created.
encoding | Encoding in string format (i.e. "UTF-8"). |
Definition at line 79 of file XmlDoc.cpp.
void set_version | ( | const std::string & | version | ) |
Sets the version of the XML document. The version is stored as attribute in the declaration node ("<?xml ...>"). If the node or the attribute does not exist yet, it is created.
version | Version in string format. |
Definition at line 70 of file XmlDoc.cpp.
std::string version | ( | ) | const |
Gives the document version.
Definition at line 88 of file XmlDoc.cpp.
Send comments to: COOLFluiD Web Admin |