ReactOS 0.4.15-dev-7906-g1b85a5f
XMLStorage::XMLMessage Struct Reference

XML message wrapper. More...

#include <xmlstorage.h>

Inheritance diagram for XMLStorage::XMLMessage:
Collaboration diagram for XMLStorage::XMLMessage:

Public Member Functions

 XMLMessage (const char *name)
 
std::string toString () const
 
- Public Member Functions inherited from XMLStorage::XMLDoc
 XMLDoc ()
 
 XMLDoc (LPCTSTR path)
 
bool read_file (LPCTSTR path)
 
bool read_buffer (const char *buffer, size_t len, const std::string &system_id=std::string())
 
bool read_buffer (const std::string &buffer, const std::string &system_id=std::string())
 
bool read_stream (std::istream &in, const std::string &system_id=std::string())
 
bool read (XMLReaderBase &reader, const std::string &display_path)
 
bool write (std::ostream &out, WRITE_MODE mode=FORMAT_SMART) const
 write XML stream
 
bool write_formating (std::ostream &out) const
 write XML stream with formating
 
bool write_file (LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
 
bool write_formating (LPCTSTR path) const
 
- Public Member Functions inherited from XMLStorage::XMLNode
 XMLNode (const XS_String &name)
 
 XMLNode (const XS_String &name, const std::string &leading)
 
 XMLNode (const XMLNode &other)
 
 XMLNode (const XMLNode &other, COPY_FLAGS copy_no_children)
 
virtual ~XMLNode ()
 
void clear ()
 
XMLNodeoperator= (const XMLNode &other)
 
void add_child (XMLNode *child)
 add a new child node
 
void remove_children (const XS_String &name)
 remove all children named 'name'
 
void put (const XS_String &attr_name, const XS_String &value)
 write access to an attribute
 
XS_Stringoperator[] (const XS_String &attr_name)
 index operator write access to an attribute
 
template<typename T >
XS_String get (const T &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
 read only access to an attribute
 
void erase (const XS_String &attr_name)
 remove the attribute 'attr_name'
 
XS_String subvalue (const XS_String &child_name, const XS_String &attr_name, int n=0) const
 convenient value access in children node
 
XS_Stringsubvalue (const XS_String &child_name, const XS_String &attr_name, int n=0)
 convenient storage of distinct values in children node
 
const Childrenget_children () const
 
Childrenget_children ()
 
const AttributeMapget_attributes () const
 
AttributeMapget_attributes ()
 
XS_String get_content () const
 read element node content
 
XS_String get_sub_content (const XPath &xpath) const
 read content of a subnode specified by an XPath expression
 
void set_content (const XS_String &s, bool cdata=false)
 set element node content
 
bool set_sub_content (const XPath &xpath, const XS_String &s, bool cdata=false)
 set content of a subnode specified by an XPath expression
 
bool write (std::ostream &out, const XMLFormat &format, WRITE_MODE mode=FORMAT_SMART, int indent=0) const
 write node with children tree to output stream
 
int count (const XPath &xpath) const
 count the nodes matching the given relative XPath expression
 
int count (XPath::const_iterator from, const XPath::const_iterator &to) const
 count the nodes matching the given relative XPath expression
 
bool filter (const XPath &xpath, XMLNode &target) const
 copy matching tree nodes using the given XPath filter expression
 
const XMLNodefind_relative (const XPath &xpath) const
 XPath find function (const)
 
XMLNodefind_relative (const XPath &xpath)
 XPath find function.
 
XMLNodeget_first_child () const
 
- Public Member Functions inherited from XMLStorage::XS_String
 XS_String ()
 
 XS_String (LPCXSSTR s)
 
 XS_String (LPCXSSTR s, size_t l)
 
 XS_String (const super &other)
 
 XS_String (const XS_String &other)
 
void assign (const XS_String &s)
 
XS_Stringoperator= (LPCXSSTR s)
 
XS_Stringoperator= (const super &s)
 
void assign (LPCXSSTR s)
 
void assign (LPCXSSTR s, size_t l)
 
 operator LPCXSSTR () const
 
XS_Stringprintf (LPCXSSTR fmt,...)
 
XS_Stringvprintf (LPCXSSTR fmt, va_list l)
 
XS_Stringappendf (LPCXSSTR fmt,...)
 
XS_Stringvappendf (LPCXSSTR fmt, va_list l)
 

Public Attributes

XMLPos _pos
 
- Public Attributes inherited from XMLStorage::XMLDoc
XMLFormat _format
 
XMLErrorList _errors
 

Protected Member Functions

 XMLMessage ()
 
- Protected Member Functions inherited from XMLStorage::XMLNode
XMLNodecreate_relative (const XPath &xpath)
 relative XPath create function
 
XMLNodefilter (XPath::const_iterator from, const XPath::const_iterator &to) const
 create a new node tree using the given XPath filter expression
 
void original_write_worker (std::ostream &out) const
 write node with children tree to output stream using original white space
 
void plain_write_worker (std::ostream &out) const
 print node without any white space
 
void pretty_write_worker (std::ostream &out, const XMLFormat &format, int indent) const
 pretty print node with children tree to output stream
 
void smart_write_worker (std::ostream &out, const XMLFormat &format, int indent) const
 write node with children tree to output stream using smart formating
 

Additional Inherited Members

- Public Types inherited from XMLStorage::XMLNode
enum  COPY_FLAGS { COPY_NOCHILDREN }
 
- Public Types inherited from XMLStorage::XS_String
typedef std::string super
 
- Protected Attributes inherited from XMLStorage::XMLNode
Children _children
 
AttributeMap _attributes
 
std::string _leading
 
std::string _content
 
std::string _end_leading
 
std::string _trailing
 
bool _cdata_content
 

Detailed Description

XML message wrapper.

Definition at line 2844 of file xmlstorage.h.

Constructor & Destructor Documentation

◆ XMLMessage() [1/2]

XMLStorage::XMLMessage::XMLMessage ( const char name)
inline

Definition at line 2846 of file xmlstorage.h.

2847 : _pos(this)
2848 {
2849 _pos.create(name);
2850 }
void create(const XS_String &name)
create node and move to it
Definition: xmlstorage.h:1643
Definition: name.c:39

◆ XMLMessage() [2/2]

XMLStorage::XMLMessage::XMLMessage ( )
inlineprotected

Definition at line 2864 of file xmlstorage.h.

2865 : _pos(this)
2866 {
2867 }

Member Function Documentation

◆ toString()

std::string XMLStorage::XMLMessage::toString ( ) const
inline

Definition at line 2852 of file xmlstorage.h.

2853 {
2854 std::ostringstream out;
2855
2856 write(out);
2857
2858 return out.str();
2859 }
#define write
Definition: acwin.h:97
static FILE * out
Definition: regtests2xml.c:44

Member Data Documentation

◆ _pos

XMLPos XMLStorage::XMLMessage::_pos

Definition at line 2861 of file xmlstorage.h.

Referenced by XMLMessage().


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