XMLStorage::XMLIntRef Struct Reference

type converter for integer data with write access More...

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLIntRef:

Collaboration graph
[legend]

Public Member Functions

 XMLIntRef (XMLNode *node, const XS_String &attr_name, int def=0)
XMLIntRefoperator= (int value)
 operator int () const
void assign (int value)

Protected Attributes

XS_String_ref

Detailed Description

type converter for integer data with write access

Definition at line 1718 of file xmlstorage.h.


Constructor & Destructor Documentation

XMLStorage::XMLIntRef::XMLIntRef ( XMLNode node,
const XS_String attr_name,
int  def = 0 
) [inline]

Definition at line 1720 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01721      :  _ref((*node)[attr_name])
01722     {
01723         if (_ref.empty())
01724             assign(def);
01725     }

Here is the call graph for this function:


Member Function Documentation

XMLIntRef& XMLStorage::XMLIntRef::operator= ( int  value  )  [inline]

Definition at line 1727 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01728     {
01729         assign(value);
01730 
01731         return *this;
01732     }

Here is the call graph for this function:

XMLStorage::XMLIntRef::operator int (  )  const [inline]

Definition at line 1734 of file xmlstorage.h.

References XS_toi.

01735     {
01736         return XS_toi(_ref.c_str());
01737     }

void XMLStorage::XMLIntRef::assign ( int  value  )  [inline]

Definition at line 1739 of file xmlstorage.h.

References COUNTOF, XS_CHAR, XS_INTFMT, and XS_snprintf.

01740     {
01741         XS_CHAR buffer[32];
01742         XS_snprintf(buffer, COUNTOF(buffer), XS_INTFMT, value);
01743         _ref.assign(buffer);
01744     }


Field Documentation

XS_String& XMLStorage::XMLIntRef::_ref [protected]

Definition at line 1747 of file xmlstorage.h.


The documentation for this struct was generated from the following file:
IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage