ReactOS  r76032
XMLStorage::XMLBoolRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLBoolRef:

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

Constructor & Destructor Documentation

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

Definition at line 1970 of file xmlstorage.h.

1971  : _ref((*node)[attr_name])
1972  {
1973  if (_ref.empty())
1974  assign(def);
1975  }
Definition: graphics.c:176
void assign(bool value)
Definition: xmlstorage.h:1994

Member Function Documentation

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

Definition at line 1994 of file xmlstorage.h.

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

1995  {
1997  }
Definition: get.c:139
#define XS_FALSE
Definition: xmlstorage.h:426
void assign(const XS_String &s)
Definition: xmlstorage.h:338
#define XS_TRUE
Definition: xmlstorage.h:425

Definition at line 1977 of file xmlstorage.h.

1978  {
1979  return !XS_icmp(_ref.c_str(), XS_TRUE);
1980  }
#define XS_icmp
Definition: xmlstorage.h:241
#define XS_TRUE
Definition: xmlstorage.h:425
bool XMLStorage::XMLBoolRef::operator! ( ) const
inline

Definition at line 1982 of file xmlstorage.h.

1983  {
1984  return XS_icmp(_ref.c_str(), XS_TRUE)? true: false;
1985  }
#define XS_icmp
Definition: xmlstorage.h:241
#define XS_TRUE
Definition: xmlstorage.h:425

Definition at line 1987 of file xmlstorage.h.

1988  {
1989  assign(value);
1990 
1991  return *this;
1992  }
Definition: get.c:139
void assign(bool value)
Definition: xmlstorage.h:1994
void XMLStorage::XMLBoolRef::toggle ( )
inline

Definition at line 1999 of file xmlstorage.h.

2000  {
2001  assign(!operator bool());
2002  }
void assign(bool value)
Definition: xmlstorage.h:1994

Member Data Documentation

XS_String& XMLStorage::XMLBoolRef::_ref
protected

Definition at line 2005 of file xmlstorage.h.

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


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