XMLStorage::XMLBoolRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLBoolRef:

Collaboration graph
[legend]

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 1631 of file xmlstorage.h.


Constructor & Destructor Documentation

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

Definition at line 1633 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01634      :  _ref((*node)[attr_name])
01635     {
01636         if (_ref.empty())
01637             assign(def);
01638     }

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 1640 of file xmlstorage.h.

References XS_icmp, and XS_TRUE.

01641     {
01642         return !XS_icmp(_ref.c_str(), XS_TRUE);
01643     }

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

Definition at line 1645 of file xmlstorage.h.

References XS_icmp, and XS_TRUE.

01646     {
01647         return XS_icmp(_ref.c_str(), XS_TRUE)? true: false;
01648     }

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

Definition at line 1650 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01651     {
01652         assign(value);
01653 
01654         return *this;
01655     }

Here is the call graph for this function:

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

Definition at line 1657 of file xmlstorage.h.

References XS_FALSE, and XS_TRUE.

01658     {
01659         _ref.assign(value? XS_TRUE: XS_FALSE);
01660     }

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

Definition at line 1662 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01663     {
01664         assign(!operator bool());
01665     }

Here is the call graph for this function:


Field Documentation

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

Definition at line 1668 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