ReactOS  0.4.12-dev-18-gf469aca
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 More...
 
bool write_formating (std::ostream &out) const
 write XML stream with formating More...
 
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 More...
 
void remove_children (const XS_String &name)
 remove all children named 'name' More...
 
void put (const XS_String &attr_name, const XS_String &value)
 write access to an attribute More...
 
XS_Stringoperator[] (const XS_String &attr_name)
 index operator write access to an attribute More...
 
template<typename T >
XS_String get (const T &attr_name, LPCXSSTR def=XS_EMPTY_STR) const
 read only access to an attribute More...
 
void erase (const XS_String &attr_name)
 remove the attribute 'attr_name' More...
 
XS_String subvalue (const XS_String &child_name, const XS_String &attr_name, int n=0) const
 convenient value access in children node More...
 
XS_Stringsubvalue (const XS_String &child_name, const XS_String &attr_name, int n=0)
 convenient storage of distinct values in children node More...
 
const Childrenget_children () const
 
Childrenget_children ()
 
const AttributeMapget_attributes () const
 
AttributeMapget_attributes ()
 
XS_String get_content () const
 read element node content More...
 
XS_String get_sub_content (const XPath &xpath) const
 read content of a subnode specified by an XPath expression More...
 
void set_content (const XS_String &s, bool cdata=false)
 set element node content More...
 
bool set_sub_content (const XPath &xpath, const XS_String &s, bool cdata=false)
 set content of a subnode specified by an XPath expression More...
 
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 More...
 
int count (const XPath &xpath) const
 count the nodes matching the given relative XPath expression More...
 
int count (XPath::const_iterator from, const XPath::const_iterator &to) const
 count the nodes matching the given relative XPath expression More...
 
bool filter (const XPath &xpath, XMLNode &target) const
 copy matching tree nodes using the given XPath filter expression More...
 
const XMLNodefind_relative (const XPath &xpath) const
 XPath find function (const) More...
 
XMLNodefind_relative (const XPath &xpath)
 XPath find function. More...
 
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 More...
 
XMLNodefilter (XPath::const_iterator from, const XPath::const_iterator &to) const
 create a new node tree using the given XPath filter expression More...
 
void original_write_worker (std::ostream &out) const
 write node with children tree to output stream using original white space More...
 
void plain_write_worker (std::ostream &out) const
 print node without any white space More...
 
void pretty_write_worker (std::ostream &out, const XMLFormat &format, int indent) const
 pretty print node with children tree to output stream More...
 
void smart_write_worker (std::ostream &out, const XMLFormat &format, int indent) const
 write node with children tree to output stream using smart formating More...
 

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:36

◆ 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  {
2855 
2856  write(out);
2857 
2858  return out.str();
2859  }
basic_ostringstream< char, char_traits< char >, allocator< char > > ostringstream
Definition: _iosfwd.h:127
bool write(std::ostream &out, WRITE_MODE mode=FORMAT_SMART) const
write XML stream
Definition: xmlstorage.h:2800
static FILE * out
Definition: regtests2xml.c:44

Member Data Documentation

◆ _pos

XMLPos XMLStorage::XMLMessage::_pos

Definition at line 2861 of file xmlstorage.h.


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