XMLStorage::XMLNode Struct Reference

in memory representation of an XML node More...

#include <xmlstorage.h>

Inheritance diagram for XMLStorage::XMLNode:

Inheritance graph
[legend]
Collaboration diagram for XMLStorage::XMLNode:

Collaboration graph
[legend]

List of all members.

Public Types

enum  COPY_FLAGS { COPY_NOCHILDREN }
typedef std::string super

Public Member Functions

 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
void assign (const XS_String &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)

Protected Member Functions

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

Protected Attributes

Children _children
AttributeMap _attributes
std::string _leading
std::string _content
std::string _end_leading
std::string _trailing
bool _cdata_content

Friends

struct XMLPos
struct const_XMLPos
struct XMLReaderBase
struct XPathElement

Classes

struct  AttributeMap
 map of XML node attributes More...
struct  Children
 internal children node list More...


Detailed Description

in memory representation of an XML node

Definition at line 854 of file xmlstorage.h.


Member Typedef Documentation

typedef std::string XMLStorage::XS_String::super [inherited]

Definition at line 296 of file xmlstorage.h.


Member Enumeration Documentation

enum XMLStorage::XMLNode::COPY_FLAGS

Enumerator:
COPY_NOCHILDREN 

Definition at line 1013 of file xmlstorage.h.

01014 {COPY_NOCHILDREN};


Constructor & Destructor Documentation

XMLStorage::XMLNode::XMLNode ( const XS_String name  )  [inline]

Definition at line 984 of file xmlstorage.h.

Referenced by create_relative(), and filter().

00986      :  XS_String(name),
00987         _cdata_content(false)
00988     {

Here is the caller graph for this function:

XMLStorage::XMLNode::XMLNode ( const XS_String name,
const std::string &  leading 
) [inline]

Definition at line 990 of file xmlstorage.h.

00992      :  XS_String(name),
00993         _leading(leading),
00994         _cdata_content(false)
00995     {

XMLStorage::XMLNode::XMLNode ( const XMLNode other  )  [inline]

Definition at line 997 of file xmlstorage.h.

References _children.

00999      :  XS_String(other),
01000         _attributes(other._attributes),
01001         _leading(other._leading),
01002         _content(other._content),
01003         _end_leading(other._end_leading),
01004         _trailing(other._trailing),
01005 #ifdef XMLNODE_LOCATION
01006         _location(other._location),
01007 #endif
01008         _cdata_content(false)
01009     {
01010         for(Children::const_iterator it=other._children.begin(); it!=other._children.end(); ++it)
01011             _children.push_back(new XMLNode(**it));

XMLStorage::XMLNode::XMLNode ( const XMLNode other,
COPY_FLAGS  copy_no_children 
) [inline]

Definition at line 1015 of file xmlstorage.h.

01017      :  XS_String(other),
01018         _attributes(other._attributes),
01019         _leading(other._leading),
01020         _content(other._content),
01021         _end_leading(other._end_leading),
01022         _trailing(other._trailing),
01023 #ifdef XMLNODE_LOCATION
01024         _location(other._location),
01025 #endif
01026         _cdata_content(false)
01027     {
01028 //      assert(copy_no_children==COPY_NOCHILDREN);

virtual XMLStorage::XMLNode::~XMLNode (  )  [inline, virtual]

Definition at line 1030 of file xmlstorage.h.

01032     {
01033         while(!_children.empty()) {
01034             delete _children.back();
01035             _children.pop_back();
01036         }


Member Function Documentation

void XMLStorage::XMLNode::clear (  )  [inline]

Definition at line 1038 of file xmlstorage.h.

Referenced by XMLStorage::XMLNode::Children::clear().

01040     {
01041         _leading.erase();
01042         _content.erase();
01043         _end_leading.erase();
01044         _trailing.erase();
01045 
01046         _attributes.clear();
01047         _children.clear();
01048 
01049         XS_String::erase();

Here is the caller graph for this function:

XMLNode& XMLStorage::XMLNode::operator= ( const XMLNode other  )  [inline]

Definition at line 1051 of file xmlstorage.h.

References _attributes, _children, _content, _end_leading, _leading, and _trailing.

01053     {
01054         _children.clear();
01055         _children.copy(other._children);
01056 
01057         _attributes = other._attributes;
01058 
01059         _leading = other._leading;
01060         _content = other._content;
01061         _end_leading = other._end_leading;
01062         _trailing = other._trailing;
01063 
01064         return *this;

void XMLStorage::XMLNode::add_child ( XMLNode child  )  [inline]

add a new child node

Definition at line 1067 of file xmlstorage.h.

Referenced by create_relative(), and filter().

01069     {
01070         _children.push_back(child);

Here is the caller graph for this function:

void XMLStorage::XMLNode::remove_children ( const XS_String name  )  [inline]

remove all children named 'name'

Definition at line 1073 of file xmlstorage.h.

01075     {
01076         Children::iterator it, next=_children.begin();
01077 
01078         while((it=next++) != _children.end())
01079             if (**it == name)
01080                 _children.erase(it);

void XMLStorage::XMLNode::put ( const XS_String attr_name,
const XS_String value 
) [inline]

write access to an attribute

Definition at line 1083 of file xmlstorage.h.

01085     {
01086         _attributes[attr_name] = value;

XS_String& XMLStorage::XMLNode::operator[] ( const XS_String attr_name  )  [inline]

index operator write access to an attribute

Definition at line 1089 of file xmlstorage.h.

01091     {
01092         return _attributes[attr_name];

template<typename T>
XS_String XMLStorage::XMLNode::get ( const T &  attr_name,
LPCXSSTR  def = XS_EMPTY_STR 
) const [inline]

read only access to an attribute

Definition at line 1095 of file xmlstorage.h.

Referenced by XMLStorage::XPathElement::matches(), subvalue(), XMLStorage::XMLBool::XMLBool(), XMLStorage::XMLDouble::XMLDouble(), XMLStorage::XMLInt::XMLInt(), XMLStorage::XMLProperty::XMLProperty(), and XMLStorage::XMLString::XMLString().

01097     {
01098         AttributeMap::const_iterator found = _attributes.find(attr_name);
01099 
01100         if (found != _attributes.end())
01101             return found->second;
01102         else
01103             return def;

Here is the caller graph for this function:

void XMLStorage::XMLNode::erase ( const XS_String attr_name  )  [inline]

remove the attribute 'attr_name'

Definition at line 1106 of file xmlstorage.h.

01108     {
01109         _attributes.erase(attr_name);

XS_String XMLStorage::XMLNode::subvalue ( const XS_String child_name,
const XS_String attr_name,
int  n = 0 
) const [inline]

convenient value access in children node

Definition at line 1112 of file xmlstorage.h.

References get(), and XMLStorage::XS_String::XS_String().

01114     {
01115         const XMLNode* node = XPathElement(child_name, n).const_find(this);
01116 
01117         if (node)
01118             return node->get(attr_name);
01119         else
01120             return XS_String();

Here is the call graph for this function:

XS_String& XMLStorage::XMLNode::subvalue ( const XS_String child_name,
const XS_String attr_name,
int  n = 0 
) [inline]

convenient storage of distinct values in children node

Definition at line 1123 of file xmlstorage.h.

01125     {
01126         XMLNode* node = XPathElement(child_name, n).find(this);
01127 
01128         if (!node) {
01129             node = new XMLNode(child_name);
01130             add_child(node);
01131         }
01132 
01133         return (*node)[attr_name];

const Children& XMLStorage::XMLNode::get_children (  )  const [inline]

Definition at line 1161 of file xmlstorage.h.

Referenced by XMLRPCStruct::XMLRPCStruct().

01163     {
01164         return _children;

Here is the caller graph for this function:

Children& XMLStorage::XMLNode::get_children (  )  [inline]

Definition at line 1166 of file xmlstorage.h.

01168     {
01169         return _children;

const AttributeMap& XMLStorage::XMLNode::get_attributes (  )  const [inline]

Definition at line 1171 of file xmlstorage.h.

01173     {
01174         return _attributes;

AttributeMap& XMLStorage::XMLNode::get_attributes (  )  [inline]

Definition at line 1176 of file xmlstorage.h.

01178     {
01179         return _attributes;

XS_String XMLStorage::XMLNode::get_content (  )  const [inline]

read element node content

Definition at line 1182 of file xmlstorage.h.

References XMLStorage::DecodeXMLString().

Referenced by get_sub_content(), and test_read().

01184     {
01185         return DecodeXMLString(_content);

Here is the call graph for this function:

Here is the caller graph for this function:

XS_String XMLStorage::XMLNode::get_sub_content ( const XPath xpath  )  const [inline]

read content of a subnode specified by an XPath expression

Definition at line 1188 of file xmlstorage.h.

References get_content(), and XS_EMPTY_STR.

Referenced by XMLRPCStruct::XMLRPCStruct().

01190     {
01191         const XMLNode* node = find_relative(xpath);
01192 
01193         if (node)
01194             return node->get_content();
01195         else
01196             return XS_EMPTY_STR;

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLStorage::XMLNode::set_content ( const XS_String s,
bool  cdata = false 
) [inline]

set element node content

Definition at line 1199 of file xmlstorage.h.

References XMLStorage::EncodeXMLString().

Referenced by XMLStorage::XMLPos::create_node_content(), and set_sub_content().

01201     {
01202         _content.assign(EncodeXMLString(s.c_str(), cdata));

Here is the call graph for this function:

Here is the caller graph for this function:

bool XMLStorage::XMLNode::set_sub_content ( const XPath xpath,
const XS_String s,
bool  cdata = false 
) [inline]

set content of a subnode specified by an XPath expression

Definition at line 1205 of file xmlstorage.h.

References set_content().

01207     {
01208         XMLNode* node = create_relative(xpath);
01209 
01210         if (node) {
01211             node->set_content(s, cdata);
01212             return true;
01213         } else
01214             return false;

Here is the call graph for this function:

bool XMLStorage::XMLNode::write ( std::ostream &  out,
const XMLFormat format,
WRITE_MODE  mode = FORMAT_SMART,
int  indent = 0 
) const [inline]

write node with children tree to output stream

Definition at line 1221 of file xmlstorage.h.

References XMLStorage::FORMAT_ORIGINAL, XMLStorage::FORMAT_PLAIN, and XMLStorage::FORMAT_PRETTY.

01223     {
01224         switch(mode) {
01225           case FORMAT_PLAIN:
01226             plain_write_worker(out);
01227             break;
01228 
01229           case FORMAT_PRETTY:
01230             pretty_write_worker(out, format, indent);
01231             break;
01232 
01233           case FORMAT_ORIGINAL:
01234             original_write_worker(out);
01235             break;
01236 
01237           default:  // FORMAT_SMART
01238             smart_write_worker(out, format, indent);
01239         }
01240 
01241         return out.good();

int XMLStorage::XMLNode::count ( const XPath xpath  )  const [inline]

count the nodes matching the given relative XPath expression

Definition at line 1244 of file xmlstorage.h.

01246     {
01247         return count(xpath.begin(), xpath.end());

int XMLStorage::XMLNode::count ( XPath::const_iterator  from,
const XPath::const_iterator &  to 
) const

count the nodes matching the given relative XPath expression

Definition at line 299 of file xmlstorage.cpp.

References _children, and XMLStorage::XPathElement::matches().

00300 {
00301     const XPathElement& elem = *from++;
00302     int cnt = 0;
00303     int n = 0;
00304 
00305     for(XMLNode::Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
00306         if (elem.matches(**it, n)) {
00307             if (from != to)
00308                  // iterate deeper
00309                 cnt += (*it)->count(from, to);
00310             else
00311                  // increment match counter
00312                 ++cnt;
00313         }
00314 
00315     return cnt;
00316 }

Here is the call graph for this function:

bool XMLStorage::XMLNode::filter ( const XPath xpath,
XMLNode target 
) const

copy matching tree nodes using the given XPath filter expression

Definition at line 319 of file xmlstorage.cpp.

References _attributes, _children, and XMLStorage::XMLNode::Children::move().

00320 {
00321     XMLNode* ret = filter(xpath.begin(), xpath.end());
00322 
00323     if (ret) {
00324          // move returned nodes to target node
00325         target._children.move(ret->_children);
00326         target._attributes = ret->_attributes;
00327 
00328         delete ret;
00329 
00330         return true;
00331     } else
00332         return false;
00333 }

Here is the call graph for this function:

const XMLNode * XMLStorage::XMLNode::find_relative ( const XPath xpath  )  const

XPath find function (const).

Definition at line 249 of file xmlstorage.cpp.

Referenced by XMLRPCParser::get_param_type(), XMLStorage::const_XMLPos::go(), and XMLStorage::XMLPos::go().

00250 {
00251     const XMLNode* node = this;
00252 
00253     for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
00254         node = it->const_find(node);
00255 
00256         if (!node)
00257             return NULL;
00258     }
00259 
00260     return node;
00261 }

Here is the caller graph for this function:

XMLNode * XMLStorage::XMLNode::find_relative ( const XPath xpath  ) 

XPath find function.

Definition at line 263 of file xmlstorage.cpp.

00264 {
00265     XMLNode* node = this;
00266 
00267     for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
00268         node = it->find(node);
00269 
00270         if (!node)
00271             return NULL;
00272     }
00273 
00274     return node;
00275 }

XMLNode* XMLStorage::XMLNode::get_first_child (  )  const [inline]

Definition at line 1261 of file xmlstorage.h.

Referenced by XMLRPCParser::get_param_type().

01263     {
01264         if (!_children.empty())
01265             return _children.front();
01266         else
01267             return NULL;

Here is the caller graph for this function:

XMLNode * XMLStorage::XMLNode::create_relative ( const XPath xpath  )  [protected]

relative XPath create function

Definition at line 277 of file xmlstorage.cpp.

References add_child(), and XMLNode().

00278 {
00279     XMLNode* node = this;
00280 
00281     for(XPath::const_iterator it=xpath.begin(); it!=xpath.end(); ++it) {
00282         XMLNode* child = it->find(node);
00283 
00284         if (!child) {
00285             child = new XMLNode(it->_child_name);
00286             node->add_child(child);
00287 
00288             if (!it->_attr_name.empty())
00289                 (*this)[it->_attr_name] = it->_attr_value;
00290         }
00291 
00292         node = child;
00293     }
00294 
00295     return node;
00296 }

Here is the call graph for this function:

XMLNode * XMLStorage::XMLNode::filter ( XPath::const_iterator  from,
const XPath::const_iterator &  to 
) const [protected]

create a new node tree using the given XPath filter expression

Definition at line 336 of file xmlstorage.cpp.

References _children, add_child(), COPY_NOCHILDREN, XMLStorage::XPathElement::matches(), and XMLNode().

00337 {
00338     XMLNode* copy = NULL;
00339 
00340     const XPathElement& elem = *from++;
00341     int cnt = 0;
00342     int n = 0;
00343 
00344     for(XMLNode::Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
00345         if (elem.matches(**it, n)) {
00346             if (!copy)
00347                 copy = new XMLNode(*this, XMLNode::COPY_NOCHILDREN);
00348 
00349             if (from != to) {
00350                 XMLNode* ret = (*it)->filter(from, to);
00351 
00352                 if (ret) {
00353                     copy->add_child(ret);
00354                     ++cnt;
00355                 }
00356             } else {
00357                 copy->add_child(new XMLNode(**it, XMLNode::COPY_NOCHILDREN));
00358                 ++cnt;
00359             }
00360         }
00361 
00362     if (cnt > 0) {
00363         return copy;
00364     } else {
00365         delete copy;
00366         return NULL;
00367     }
00368 }

Here is the call graph for this function:

void XMLStorage::XMLNode::original_write_worker ( std::ostream &  out  )  const [protected]

write node with children tree to output stream using original white space

Definition at line 522 of file xmlstorage.cpp.

00527 {
00528     out << _leading << '<' << EncodeXMLString(*this);
00529 
00530     for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it)
00531         out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\"";
00532 
00533     if (!_children.empty() || !_content.empty()) {
00534         out << '>';
00535 
00536         if (_cdata_content)
00537             out << CDATA_START << _content << CDATA_END;
00538         else
00539             out << _content;
00540 
00541         for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
00542             (*it)->original_write_worker(out);
00543 
00544         out << _end_leading << "</" << EncodeXMLString(*this) << '>';
00545     } else

void XMLStorage::XMLNode::plain_write_worker ( std::ostream &  out  )  const [protected]

print node without any white space

Definition at line 549 of file xmlstorage.cpp.

00554 {
00555     out << '<' << EncodeXMLString(*this);
00556 
00557     for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it)
00558         out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\"";
00559 
00560      // strip leading white space from content
00561     const char* content = _content.c_str();
00562     while(isspace((unsigned char)*content)) ++content;
00563 
00564     if (!_children.empty() || *content) {
00565         out << ">" << content;
00566 
00567         for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
00568             (*it)->plain_write_worker(out);
00569 

void XMLStorage::XMLNode::pretty_write_worker ( std::ostream &  out,
const XMLFormat format,
int  indent 
) const [protected]

pretty print node with children tree to output stream

Definition at line 573 of file xmlstorage.cpp.

00578 {
00579     for(int i=indent; i--; )
00580         out << XML_INDENT_SPACE;
00581 
00582     out << '<' << EncodeXMLString(*this);
00583 
00584     for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it)
00585         out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\"";
00586 
00587      // strip leading white space from content
00588     const char* content = _content.c_str();
00589     while(isspace((unsigned char)*content)) ++content;
00590 
00591     if (!_children.empty() || *content) {
00592         out << '>' << content;
00593 
00594         if (!_children.empty())
00595             out << format._endl;
00596 
00597         for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
00598             (*it)->pretty_write_worker(out, format, indent+1);
00599 
00600         for(int i=indent; i--; )
00601             out << XML_INDENT_SPACE;
00602 

void XMLStorage::XMLNode::smart_write_worker ( std::ostream &  out,
const XMLFormat format,
int  indent 
) const [protected]

write node with children tree to output stream using smart formating

Definition at line 606 of file xmlstorage.cpp.

00611 {
00612      // strip the first line feed from _leading
00613     const char* leading = _leading.c_str();
00614     if (*leading == '\n') ++leading;
00615 
00616     if (!*leading)
00617         for(int i=indent; i--; )
00618             out << XML_INDENT_SPACE;
00619     else
00620         out << leading;
00621 
00622     out << '<' << EncodeXMLString(*this);
00623 
00624     for(AttributeMap::const_iterator it=_attributes.begin(); it!=_attributes.end(); ++it)
00625         out << ' ' << EncodeXMLString(it->first) << "=\"" << EncodeXMLString(it->second) << "\"";
00626 
00627      // strip leading white space from content
00628     const char* content = _content.c_str();
00629     while(isspace((unsigned char)*content)) ++content;
00630 
00631     if (_children.empty() && !*content)
00632         out << "/>";
00633     else {
00634         out << '>';
00635 
00636         if (_cdata_content)
00637             out << CDATA_START << _content << CDATA_END;
00638         else if (!*content)
00639             out << format._endl;
00640         else
00641             out << content;
00642 
00643         Children::const_iterator it = _children.begin();
00644 
00645         if (it != _children.end()) {
00646             for(; it!=_children.end(); ++it)
00647                 (*it)->smart_write_worker(out, format, indent+1);
00648 
00649              // strip the first line feed from _end_leading
00650             const char* end_leading = _end_leading.c_str();
00651             if (*end_leading == '\n') ++end_leading;
00652 
00653             if (!*end_leading)
00654                 for(int i=indent; i--; )
00655                     out << XML_INDENT_SPACE;
00656             else
00657                 out << end_leading;
00658         } else
00659             out << _end_leading;
00660 
00661         out << "</" << EncodeXMLString(*this) << '>';
00662     }
00663 
00664     if (_trailing.empty())

void XMLStorage::XS_String::assign ( const XS_String s  )  [inline, inherited]

Definition at line 337 of file xmlstorage.h.

Referenced by XMLStorage::XMLStringRef::operator=(), XMLStorage::XMLDoubleRef::operator=(), XMLStorage::XMLIntRef::operator=(), XMLStorage::XMLBoolRef::operator=(), XMLStorage::XMLNode::Children::operator=(), XMLStorage::XPathElement::parse(), XMLStorage::XMLBoolRef::toggle(), XMLStorage::XMLBoolRef::XMLBoolRef(), XMLStorage::XMLDoubleRef::XMLDoubleRef(), XMLStorage::XMLIntRef::XMLIntRef(), and XMLStorage::XMLStringRef::XMLStringRef().

00338 {assign(s.c_str());}

Here is the caller graph for this function:

void XMLStorage::XS_String::assign ( LPCXSSTR  s  )  [inline, inherited]

Definition at line 342 of file xmlstorage.h.

00342 {super::assign(s); return *this;}

void XMLStorage::XS_String::assign ( LPCXSSTR  s,
size_t  l 
) [inline, inherited]

Definition at line 343 of file xmlstorage.h.

00343 {super::assign(s);}

XMLStorage::XS_String::operator LPCXSSTR (  )  const [inline, inherited]

Definition at line 345 of file xmlstorage.h.

00346 {return c_str();}

XS_String& XMLStorage::XS_String::printf ( LPCXSSTR  fmt,
  ... 
) [inline, inherited]

Definition at line 357 of file xmlstorage.h.

References BUFFER_LEN, COUNTOF, XS_CHAR, and XS_vsnprintf.

00359     {
00360         va_list l;
00361         XS_CHAR b[BUFFER_LEN];
00362 
00363         va_start(l, fmt);
00364         super::assign(b, XS_vsnprintf(b, COUNTOF(b), fmt, l));
00365         va_end(l);
00366 
00367         return *this;

XS_String& XMLStorage::XS_String::vprintf ( LPCXSSTR  fmt,
va_list  l 
) [inline, inherited]

Definition at line 369 of file xmlstorage.h.

References BUFFER_LEN, COUNTOF, XS_CHAR, and XS_vsnprintf.

00371     {
00372         XS_CHAR b[BUFFER_LEN];
00373 
00374         super::assign(b, XS_vsnprintf(b, COUNTOF(b), fmt, l));
00375 
00376         return *this;

XS_String& XMLStorage::XS_String::appendf ( LPCXSSTR  fmt,
  ... 
) [inline, inherited]

Definition at line 378 of file xmlstorage.h.

References BUFFER_LEN, COUNTOF, XS_CHAR, and XS_vsnprintf.

00380     {
00381         va_list l;
00382         XS_CHAR b[BUFFER_LEN];
00383 
00384         va_start(l, fmt);
00385         super::append(b, XS_vsnprintf(b, COUNTOF(b), fmt, l));
00386         va_end(l);
00387 
00388         return *this;

XS_String& XMLStorage::XS_String::vappendf ( LPCXSSTR  fmt,
va_list  l 
) [inline, inherited]

Definition at line 390 of file xmlstorage.h.

References BUFFER_LEN, COUNTOF, XS_CHAR, and XS_vsnprintf.

00392     {
00393         XS_CHAR b[BUFFER_LEN];
00394 
00395         super::append(b, XS_vsnprintf(b, COUNTOF(b), fmt, l));
00396 
00397         return *this;


Friends And Related Function Documentation

friend struct XMLPos [friend]

Definition at line 979 of file xmlstorage.h.

friend struct const_XMLPos [friend]

Definition at line 980 of file xmlstorage.h.

friend struct XMLReaderBase [friend]

Definition at line 981 of file xmlstorage.h.

friend struct XPathElement [friend]

Definition at line 982 of file xmlstorage.h.


Member Data Documentation

Children XMLStorage::XMLNode::_children [protected]

Definition at line 1270 of file xmlstorage.h.

Referenced by XMLStorage::XPathElement::const_find(), count(), XMLStorage::XMLPos::delete_this(), filter(), XMLStorage::XPathElement::find(), operator=(), and XMLNode().

AttributeMap XMLStorage::XMLNode::_attributes [protected]

Definition at line 1271 of file xmlstorage.h.

Referenced by filter(), and operator=().

std::string XMLStorage::XMLNode::_leading [protected]

Definition at line 1273 of file xmlstorage.h.

Referenced by operator=().

std::string XMLStorage::XMLNode::_content [protected]

Definition at line 1274 of file xmlstorage.h.

Referenced by operator=().

std::string XMLStorage::XMLNode::_end_leading [protected]

Definition at line 1275 of file xmlstorage.h.

Referenced by operator=().

std::string XMLStorage::XMLNode::_trailing [protected]

Definition at line 1276 of file xmlstorage.h.

Referenced by operator=().

bool XMLStorage::XMLNode::_cdata_content [protected]

Definition at line 1282 of file xmlstorage.h.


The documentation for this struct was generated from the following files:
Generated on Sat Jan 9 00:05:51 2010 for XMLStorage/C++ by  doxygen 1.5.4