XMLStorage::XMLBoolRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLBoolRef:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLBoolRef (XMLNode *node, const XS_String &attr_name, bool def=false)
 operator bool () const
bool operator! () const
XMLBoolRefoperator= (bool value)
void assign (bool value)
void toggle ()

Protected Attributes

XS_String_ref


Detailed Description

type converter for boolean data with write access

Definition at line 1971 of file xmlstorage.h.


Constructor & Destructor Documentation

XMLStorage::XMLBoolRef::XMLBoolRef ( XMLNode node,
const XS_String attr_name,
bool  def = false 
) [inline]

Definition at line 1973 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01973 {
01974     XMLBoolRef(XMLNode* node, const XS_String& attr_name, bool def=false)
01975      :  _ref((*node)[attr_name])
01976     {
01977         if (_ref.empty())
01978             assign(def);

Here is the call graph for this function:


Member Function Documentation

XMLStorage::XMLBoolRef::operator bool (  )  const [inline]

Definition at line 1980 of file xmlstorage.h.

References XS_icmp, and XS_TRUE.

01982     {
01983         return !XS_icmp(_ref.c_str(), XS_TRUE);

bool XMLStorage::XMLBoolRef::operator! (  )  const [inline]

Definition at line 1985 of file xmlstorage.h.

References XS_icmp, and XS_TRUE.

01987     {
01988         return XS_icmp(_ref.c_str(), XS_TRUE)? true: false;

XMLBoolRef& XMLStorage::XMLBoolRef::operator= ( bool  value  )  [inline]

Definition at line 1990 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01992     {
01993         assign(value);
01994 
01995         return *this;

Here is the call graph for this function:

void XMLStorage::XMLBoolRef::assign ( bool  value  )  [inline]

Definition at line 1997 of file xmlstorage.h.

References XS_FALSE, and XS_TRUE.

01999     {
02000         _ref.assign(value? XS_TRUE: XS_FALSE);

void XMLStorage::XMLBoolRef::toggle (  )  [inline]

Definition at line 2002 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

02004     {
02005         assign(!operator bool());

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 2008 of file xmlstorage.h.


The documentation for this struct was generated from the following file:
Generated on Mon Aug 30 00:05:58 2010 for XMLStorage/C++ by  doxygen 1.5.4