ReactOS 0.4.15-dev-7670-g69b08be
XMLStorage::XMLDoubleRef Struct Reference

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

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLDoubleRef:

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 2137 of file xmlstorage.h.

Constructor & Destructor Documentation

◆ XMLDoubleRef()

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

Definition at line 2139 of file xmlstorage.h.

2140 : _ref((*node)[attr_name])
2141 {
2142 if (_ref.empty())
2143 assign(def);
2144 }
void assign(double value)
Definition: xmlstorage.h:2159
Definition: dlist.c:348

Member Function Documentation

◆ assign()

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

Definition at line 2159 of file xmlstorage.h.

2160 {
2161 XS_CHAR buffer[32];
2164 }
GLuint buffer
Definition: glext.h:5915
#define COUNTOF(x)
Definition: utility.h:93
void assign(const XS_String &s)
Definition: xmlstorage.h:338
Definition: pdh_main.c:94
#define XS_CHAR
Definition: xmlstorage.h:236
#define XS_FLOATFMT
Definition: xmlstorage.h:428
#define XS_snprintf
Definition: xmlstorage.h:247

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

◆ operator double()

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

Definition at line 2153 of file xmlstorage.h.

2154 {
2155 LPTSTR end;
2156 return XS_tod(_ref.c_str(), &end);
2157 }
GLuint GLuint end
Definition: gl.h:1545
#define XS_tod
Definition: xmlstorage.h:245
CHAR * LPTSTR
Definition: xmlstorage.h:192

◆ operator=()

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

Definition at line 2146 of file xmlstorage.h.

2147 {
2148 assign(value);
2149
2150 return *this;
2151 }

Member Data Documentation

◆ _ref

XS_String& XMLStorage::XMLDoubleRef::_ref
protected

Definition at line 2167 of file xmlstorage.h.

Referenced by assign(), operator double(), and XMLDoubleRef().


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