XMLStorage::XMLDoubleRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLDoubleRef:

Collaboration graph
[legend]

Public Member Functions

 XMLDoubleRef (XMLNode *node, const XS_String &attr_name, double def=0.)
XMLDoubleRefoperator= (double value)
 operator double () const
void assign (double value)

Protected Attributes

XS_String_ref

Detailed Description

type converter for numeric data with write access

Definition at line 1800 of file xmlstorage.h.


Constructor & Destructor Documentation

XMLStorage::XMLDoubleRef::XMLDoubleRef ( XMLNode node,
const XS_String attr_name,
double  def = 0. 
) [inline]

Definition at line 1802 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01803      :  _ref((*node)[attr_name])
01804     {
01805         if (_ref.empty())
01806             assign(def);
01807     }

Here is the call graph for this function:


Member Function Documentation

XMLDoubleRef& XMLStorage::XMLDoubleRef::operator= ( double  value  )  [inline]

Definition at line 1809 of file xmlstorage.h.

References XMLStorage::XS_String::assign().

01810     {
01811         assign(value);
01812 
01813         return *this;
01814     }

Here is the call graph for this function:

XMLStorage::XMLDoubleRef::operator double (  )  const [inline]

Definition at line 1816 of file xmlstorage.h.

References XS_tod.

01817     {
01818         LPTSTR end;
01819         return XS_tod(_ref.c_str(), &end);
01820     }

void XMLStorage::XMLDoubleRef::assign ( double  value  )  [inline]

Definition at line 1822 of file xmlstorage.h.

References COUNTOF, XS_CHAR, XS_FLOATFMT, and XS_snprintf.

01823     {
01824         XS_CHAR buffer[32];
01825         XS_snprintf(buffer, COUNTOF(buffer), XS_FLOATFMT, value);
01826         _ref.assign(buffer);
01827     }


Field Documentation

XS_String& XMLStorage::XMLDoubleRef::_ref [protected]

Definition at line 1830 of file xmlstorage.h.


The documentation for this struct was generated from the following file:
IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage