Public Member Functions | Protected Attributes | Private Member Functions

XMLStorage::XMLInt64 Struct Reference

type converter for integer data More...

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLInt64:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLInt64 (INT64 value)
 XMLInt64 (UINT64 value)
 XMLInt64 (LPCXSSTR value, INT64 def=0)
 XMLInt64 (const XMLNode *node, const XS_String &attr_name, INT64 def=0)
 operator INT64 () const
 operator XS_String () const

Protected Attributes

INT64 _value

Private Member Functions

XMLInt64operator= (const XMLInt64 &)

Detailed Description

type converter for integer data

Definition at line 3688 of file xmlstorage.h.


Constructor & Destructor Documentation

XMLStorage::XMLInt64::XMLInt64 ( INT64  value ) [inline]

Definition at line 3690 of file xmlstorage.h.

     :  _value(value)
    {
    }
XMLStorage::XMLInt64::XMLInt64 ( UINT64  value ) [inline]

Definition at line 3695 of file xmlstorage.h.

     :  _value((INT64)value)
    {
    }
XMLStorage::XMLInt64::XMLInt64 ( LPCXSSTR  value,
INT64  def = 0 
) [inline]

Definition at line 3700 of file xmlstorage.h.

References _value, LPCXSSTR, XMLStorage::safe_skip_space(), and XS_toi64.

    {
        LPCXSSTR p = safe_skip_space(value);

        if (*p)
            _value = XS_toi64(p);
        else
            _value = def;
    }

Here is the call graph for this function:

XMLStorage::XMLInt64::XMLInt64 ( const XMLNode node,
const XS_String attr_name,
INT64  def = 0 
) [inline]

Definition at line 3710 of file xmlstorage.h.

References _value, XMLStorage::XMLNode::get(), and XS_toi64.

    {
        const XS_String& value = node->get(attr_name);

        if (!value.empty())
            _value = XS_toi64(value.c_str());
        else
            _value = def;
    }

Here is the call graph for this function:


Member Function Documentation

XMLStorage::XMLInt64::operator INT64 (  ) const [inline]

Definition at line 3720 of file xmlstorage.h.

References _value.

    {
        return _value;
    }
XMLStorage::XMLInt64::operator XS_String (  ) const [inline]

Definition at line 3725 of file xmlstorage.h.

References _value, COUNTOF, XS_CHAR, XS_INT64FMT, and XS_snprintf.

    {
        XS_CHAR buffer[64];
        XS_snprintf(buffer, COUNTOF(buffer), XS_INT64FMT, _value);
        return XS_String(buffer);
    }
XMLInt64& XMLStorage::XMLInt64::operator= ( const XMLInt64  ) [private]

Member Data Documentation

Definition at line 3733 of file xmlstorage.h.

Referenced by operator INT64(), operator XS_String(), and XMLInt64().


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