type converter for integer data More...
#include <xmlstorage.h>
Public Member Functions | |
XMLInt (int value) | |
XMLInt (size_t 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 |
type converter for integer data
Definition at line 3507 of file xmlstorage.h.
XMLStorage::XMLInt::XMLInt | ( | int | value ) | [inline] |
Definition at line 3509 of file xmlstorage.h.
: _value(value) { }
XMLStorage::XMLInt::XMLInt | ( | size_t | value ) | [inline] |
Definition at line 3514 of file xmlstorage.h.
: _value((int)value) { }
XMLStorage::XMLInt::XMLInt | ( | LPCXSSTR | value, |
int | def = 0 |
||
) | [inline] |
Definition at line 3519 of file xmlstorage.h.
References _value, LPCXSSTR, XMLStorage::safe_skip_space(), and XS_toi.
{ LPCXSSTR p = safe_skip_space(value); if (*p) _value = XS_toi(p); else _value = def; }
XMLStorage::XMLInt::XMLInt | ( | const XMLNode * | node, |
const XS_String & | attr_name, | ||
int | def = 0 |
||
) | [inline] |
Definition at line 3529 of file xmlstorage.h.
References _value, XMLStorage::XMLNode::get(), and XS_toi.
{ const XS_String& value = node->get(attr_name); if (!value.empty()) _value = XS_toi(value.c_str()); else _value = def; }
XMLStorage::XMLInt::operator int | ( | ) | const [inline] |
XMLStorage::XMLInt::operator XS_String | ( | ) | const [inline] |
Definition at line 3544 of file xmlstorage.h.
References _value, COUNTOF, XS_CHAR, XS_INTFMT, and XS_snprintf.
{ XS_CHAR buffer[32]; XS_snprintf(buffer, COUNTOF(buffer), XS_INTFMT, _value); return XS_String(buffer); }
int XMLStorage::XMLInt::_value [protected] |
Definition at line 3552 of file xmlstorage.h.
Referenced by operator int(), operator XS_String(), and XMLInt().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |