ReactOS 0.4.15-dev-5666-gc548b97
XMLStorage::XMLDouble Struct Reference

type converter for numeric data More...

#include <xmlstorage.h>

Public Member Functions

 XMLDouble (double value)
 
 XMLDouble (LPCXSSTR value, double def=0.)
 
 XMLDouble (const XMLNode *node, const XS_String &attr_name, double def=0.)
 
 operator double () const
 
 operator XS_String () const
 

Protected Attributes

double _value
 

Private Member Functions

void operator= (const XMLDouble &)
 

Detailed Description

type converter for numeric data

Definition at line 2089 of file xmlstorage.h.

Constructor & Destructor Documentation

◆ XMLDouble() [1/3]

XMLStorage::XMLDouble::XMLDouble ( double  value)
inline

Definition at line 2091 of file xmlstorage.h.

2092 : _value(value)
2093 {
2094 }
Definition: pdh_main.c:94

◆ XMLDouble() [2/3]

XMLStorage::XMLDouble::XMLDouble ( LPCXSSTR  value,
double  def = 0. 
)
inline

Definition at line 2096 of file xmlstorage.h.

2097 {
2098 LPTSTR end;
2099
2100 if (value && *value)//@@ also handle white space and return def instead of 0
2101 _value = XS_tod(value, &end);
2102 else
2103 _value = def;
2104 }
GLuint GLuint end
Definition: gl.h:1545
#define XS_tod
Definition: xmlstorage.h:245
CHAR * LPTSTR
Definition: xmlstorage.h:192

◆ XMLDouble() [3/3]

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

Definition at line 2106 of file xmlstorage.h.

2107 {
2108 LPTSTR end;
2109 const XS_String& value = node->get(attr_name);
2110
2111 if (!value.empty())
2112 _value = XS_tod(value.c_str(), &end);
2113 else
2114 _value = def;
2115 }
Definition: dlist.c:348

Member Function Documentation

◆ operator double()

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

Definition at line 2117 of file xmlstorage.h.

2118 {
2119 return _value;
2120 }

◆ operator XS_String()

XMLStorage::XMLDouble::operator XS_String ( ) const
inline

Definition at line 2122 of file xmlstorage.h.

2123 {
2124 XS_CHAR buffer[32];
2126 return XS_String(buffer);
2127 }
GLuint buffer
Definition: glext.h:5915
#define COUNTOF(x)
Definition: utility.h:93
#define XS_CHAR
Definition: xmlstorage.h:236
#define XS_FLOATFMT
Definition: xmlstorage.h:428
#define XS_snprintf
Definition: xmlstorage.h:247

◆ operator=()

void XMLStorage::XMLDouble::operator= ( const XMLDouble )
private

Member Data Documentation

◆ _value

double XMLStorage::XMLDouble::_value
protected

Definition at line 2130 of file xmlstorage.h.

Referenced by operator double(), operator XS_String(), and XMLDouble().


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