Public Member Functions | Protected Attributes

xmlstorage::XMLBoolRef Class Reference

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

Collaboration diagram for xmlstorage::XMLBoolRef:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 this (XMLNode node, char[] attr_name, bool def=false)
bool opCast ()
bool opNot ()
void toggle ()
XMLBoolRef opAssign (bool value)
void assign (bool value)

Protected Attributes

char *[] _pref

Detailed Description

type converter for boolean data with write access

Definition at line 1285 of file xmlstorage.d.


Constructor & Destructor Documentation

xmlstorage::XMLBoolRef::this ( XMLNode  node,
char[]  attr_name,
bool  def = false 
) [inline]

Definition at line 1288 of file xmlstorage.d.

    {
        _pref = node.get_ref(attr_name);

        if (!(*_pref).length)
            assign(def);
    }

Member Function Documentation

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

Definition at line 1318 of file xmlstorage.d.

References xmlstorage::XS_FALSE, and xmlstorage::XS_TRUE.

    {
        *_pref = value? XS_TRUE: XS_FALSE;
    }
XMLBoolRef xmlstorage::XMLBoolRef::opAssign ( bool  value ) [inline]

Definition at line 1311 of file xmlstorage.d.

    {
        assign(value);

        return this;
    }
bool xmlstorage::XMLBoolRef::opCast (  ) [inline]

Definition at line 1296 of file xmlstorage.d.

References xmlstorage::XS_TRUE.

    {
        return !icmp(*_pref, XS_TRUE);
    }
bool xmlstorage::XMLBoolRef::opNot (  ) [inline]

Definition at line 1301 of file xmlstorage.d.

References xmlstorage::XS_TRUE.

    {
        return icmp(*_pref, XS_TRUE)? true: false;
    }
void xmlstorage::XMLBoolRef::toggle (  ) [inline]

Definition at line 1306 of file xmlstorage.d.

    {
        assign(!opNot());
    }

Member Data Documentation

char* [] xmlstorage::XMLBoolRef::_pref [protected]

Definition at line 1324 of file xmlstorage.d.


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