ReactOS 0.4.15-dev-7842-g558ab78
XMLStorage::XMLInt Struct Reference

type converter for integer data More...

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLInt:

Public Member Functions

 XMLInt (int value)
 
 XMLInt (LPCXSSTR value, int def=0)
 
 XMLInt (const XMLNode *node, const XS_String &attr_name, int def=0)
 
 operator int () const
 
 operator XS_String () const
 

Protected Attributes

int _value
 

Private Member Functions

void operator= (const XMLInt &)
 

Detailed Description

type converter for integer data

Definition at line 2010 of file xmlstorage.h.

Constructor & Destructor Documentation

◆ XMLInt() [1/3]

XMLStorage::XMLInt::XMLInt ( int  value)
inline

Definition at line 2012 of file xmlstorage.h.

2013 : _value(value)
2014 {
2015 }
Definition: pdh_main.c:94

◆ XMLInt() [2/3]

XMLStorage::XMLInt::XMLInt ( LPCXSSTR  value,
int  def = 0 
)
inline

Definition at line 2017 of file xmlstorage.h.

2018 {
2019 if (value && *value)//@@ also handle white space and return def instead of 0
2020 _value = XS_toi(value);
2021 else
2022 _value = def;
2023 }
#define XS_toi
Definition: xmlstorage.h:244

◆ XMLInt() [3/3]

XMLStorage::XMLInt::XMLInt ( const XMLNode node,
const XS_String attr_name,
int  def = 0 
)
inline

Definition at line 2025 of file xmlstorage.h.

2026 {
2027 const XS_String& value = node->get(attr_name);
2028
2029 if (!value.empty())
2030 _value = XS_toi(value.c_str());
2031 else
2032 _value = def;
2033 }
Definition: dlist.c:348

Member Function Documentation

◆ operator int()

XMLStorage::XMLInt::operator int ( ) const
inline

Definition at line 2035 of file xmlstorage.h.

2036 {
2037 return _value;
2038 }

◆ operator XS_String()

XMLStorage::XMLInt::operator XS_String ( ) const
inline

Definition at line 2040 of file xmlstorage.h.

2041 {
2042 XS_CHAR buffer[32];
2044 return XS_String(buffer);
2045 }
GLuint buffer
Definition: glext.h:5915
#define COUNTOF(x)
Definition: utility.h:93
#define XS_CHAR
Definition: xmlstorage.h:236
#define XS_INTFMT
Definition: xmlstorage.h:427
#define XS_snprintf
Definition: xmlstorage.h:247

◆ operator=()

void XMLStorage::XMLInt::operator= ( const XMLInt )
private

Member Data Documentation

◆ _value

int XMLStorage::XMLInt::_value
protected

Definition at line 2048 of file xmlstorage.h.

Referenced by operator int(), operator XS_String(), and XMLInt().


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