ReactOS  0.4.15-dev-4914-g2220e56
XMLStorage::XMLIntRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLIntRef:

Public Member Functions

 XMLIntRef (XMLNode *node, const XS_String &attr_name, int def=0)
XMLIntRefoperator= (int value)
 operator int () const
void assign (int value)

Protected Attributes


Detailed Description

type converter for integer data with write access

Definition at line 2055 of file xmlstorage.h.

Constructor & Destructor Documentation

◆ XMLIntRef()

XMLStorage::XMLIntRef::XMLIntRef ( XMLNode node,
const XS_String attr_name,
int  def = 0 

Definition at line 2057 of file xmlstorage.h.

2058  : _ref((*node)[attr_name])
2059  {
2060  if (_ref.empty())
2061  assign(def);
2062  }
void assign(int value)
Definition: xmlstorage.h:2076
Definition: dlist.c:348

Member Function Documentation

◆ assign()

void XMLStorage::XMLIntRef::assign ( int  value)

Definition at line 2076 of file xmlstorage.h.

2077  {
2078  XS_CHAR buffer[32];
2080  _ref.assign(buffer);
2081  }
Definition: pdh_main.c:93
GLuint buffer
Definition: glext.h:5915
void assign(const XS_String &s)
Definition: xmlstorage.h:338
#define XS_snprintf
Definition: xmlstorage.h:247
#define XS_CHAR
Definition: xmlstorage.h:236
#define COUNTOF(b)
Definition: xmlstorage.h:271
#define XS_INTFMT
Definition: xmlstorage.h:427

Referenced by operator=(), and XMLIntRef().

◆ operator int()

Definition at line 2071 of file xmlstorage.h.

2072  {
2073  return XS_toi(_ref.c_str());
2074  }
#define XS_toi
Definition: xmlstorage.h:244

◆ operator=()

Definition at line 2064 of file xmlstorage.h.

2065  {
2066  assign(value);
2068  return *this;
2069  }
Definition: pdh_main.c:93
void assign(int value)
Definition: xmlstorage.h:2076

Member Data Documentation

◆ _ref

XS_String& XMLStorage::XMLIntRef::_ref

Definition at line 2084 of file xmlstorage.h.

Referenced by assign(), operator int(), and XMLIntRef().

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