ReactOS  0.4.10-dev-348-gbcec1fd
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


Detailed Description

type converter for numeric data with write access

Definition at line 2137 of file xmlstorage.h.

Constructor & Destructor Documentation

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

Definition at line 2139 of file xmlstorage.h.

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

Member Function Documentation

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

Definition at line 2159 of file xmlstorage.h.

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

2160  {
2161  XS_CHAR buffer[32];
2162  XS_snprintf(buffer, COUNTOF(buffer), XS_FLOATFMT, value);
2163  _ref.assign(buffer);
2164  }
Definition: get.c:139
GLuint buffer
Definition: glext.h:5915
void assign(const XS_String &s)
Definition: xmlstorage.h:338
#define XS_snprintf
Definition: xmlstorage.h:247
#define XS_CHAR
Definition: xmlstorage.h:236
#define COUNTOF(b)
Definition: xmlstorage.h:271
Definition: xmlstorage.h:428

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
Definition: xmlstorage.h:192

Definition at line 2146 of file xmlstorage.h.

2147  {
2148  assign(value);
2150  return *this;
2151  }
Definition: get.c:139
void assign(double value)
Definition: xmlstorage.h:2159

Member Data Documentation

XS_String& XMLStorage::XMLDoubleRef::_ref

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: