Public Member Functions | Protected Attributes

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


Constructor & Destructor Documentation

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

Definition at line 3467 of file xmlstorage.h.

References _ref, and assign().

     :  _ref((*node)[attr_name])
    {
        if (_ref.empty())
            assign(def);
    }

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 3491 of file xmlstorage.h.

References _ref, XMLStorage::XS_String::assign(), XS_FALSE, and XS_TRUE.

Referenced by operator=(), toggle(), and XMLBoolRef().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 3474 of file xmlstorage.h.

References _ref, XS_icmp, and XS_TRUE.

    {
        return !XS_icmp(_ref.c_str(), XS_TRUE);
    }
bool XMLStorage::XMLBoolRef::operator! (  ) const [inline]

Definition at line 3479 of file xmlstorage.h.

References _ref, XS_icmp, and XS_TRUE.

    {
        return XS_icmp(_ref.c_str(), XS_TRUE)? true: false;
    }
XMLBoolRef& XMLStorage::XMLBoolRef::operator= ( bool  value ) [inline]

Definition at line 3484 of file xmlstorage.h.

References assign().

    {
        assign(value);

        return *this;
    }

Here is the call graph for this function:

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

Definition at line 3496 of file xmlstorage.h.

References assign().

Referenced by TaskbarSettingsDlg::Command().

    {
        assign(!operator bool());
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 3502 of file xmlstorage.h.

Referenced by assign(), operator bool(), operator!(), and XMLBoolRef().


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

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage