ReactOS 0.4.16-dev-1946-g52006dd
Data Struct Reference

#include <xml2sdb.h>

Collaboration diagram for Data:

Public Member Functions

 Data (int index, int value)
 
bool operator== (const Data &other) const
 
bool operator< (const Data &other) const
 
bool fromXml (XMLHandle dbNode)
 
bool toSdb (Database &db)
 

Public Attributes

std::string Name
 
TAGID Tagid = 0
 
DWORD DataType = 0
 
std::string StringData
 
DWORD DWordData = 0
 
QWORD QWordData = 0
 

Private Attributes

int m_index
 
int m_value
 

Detailed Description

Definition at line 77 of file sort_test.cpp.

Constructor & Destructor Documentation

◆ Data()

Data::Data ( int  index,
int  value 
)
inline

Definition at line 78 of file sort_test.cpp.

GLuint index
Definition: glext.h:6031
int m_value
Definition: sort_test.cpp:87
int m_index
Definition: sort_test.cpp:87
Definition: pdh_main.c:96

Referenced by BiConvertBcdElements(), and ExpValidateNlsLocaleData().

Member Function Documentation

◆ fromXml()

bool Data::fromXml ( XMLHandle  dbNode)

Definition at line 467 of file xml2sdb.cpp.

468{
469 Name = ReadStringNode(dbNode, "NAME");
470
471 StringData = ReadStringNode(dbNode, "DATA_STRING");
472 if (!StringData.empty())
473 {
475 return !Name.empty();
476 }
477 DWordData = ReadDWordNode(dbNode, "DATA_DWORD");
478 if (DWordData)
479 {
481 return !Name.empty();
482 }
483 QWordData = ReadQWordNode(dbNode, "DATA_QWORD");
484 if (QWordData)
485 {
487 return !Name.empty();
488 }
489
490 SHIM_ERR("Data node (%s) without value!\n", Name.c_str());
491 return false;
492}
#define REG_SZ
Definition: layer.c:22
#define REG_QWORD
Definition: sdbapi.c:616
#define REG_DWORD
Definition: sdbapi.c:615
#define SHIM_ERR(fmt,...)
Definition: sdbpapi.h:76
DataType
Definition: simd.h:252
std::string Name
Definition: xml2sdb.h:114
DWORD DWordData
Definition: xml2sdb.h:119
std::string StringData
Definition: xml2sdb.h:118
QWORD QWordData
Definition: xml2sdb.h:120
QWORD ReadQWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:122
DWORD ReadDWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:134
std::string ReadStringNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:110

Referenced by fromXml().

◆ operator<()

bool Data::operator< ( const Data other) const
inline

Definition at line 83 of file sort_test.cpp.

84 { return m_value < other.m_value; }
int other
Definition: msacm.c:1376

◆ operator==()

bool Data::operator== ( const Data other) const
inline

Definition at line 81 of file sort_test.cpp.

82 { return m_index == other.m_index && m_value == other.m_value; }

◆ toSdb()

bool Data::toSdb ( Database db)

Definition at line 494 of file xml2sdb.cpp.

495{
497 db.WriteString(TAG_NAME, Name, true);
499 switch (DataType)
500 {
501 case REG_SZ:
503 break;
504 case REG_DWORD:
506 break;
507 case REG_QWORD:
509 break;
510 default:
511 SHIM_ERR("Data node (%s) with unknown type (0x%x)\n", Name.c_str(), DataType);
512 return false;
513 }
514
515 return !!db.EndWriteListTag(Tagid);
516}
#define TAG_DATA
Definition: db.cpp:93
#define TAG_DATA_VALUETYPE
Definition: sdbtagid.h:86
#define TAG_DATA_QWORD
Definition: sdbtagid.h:116
#define TAG_DATA_STRING
Definition: sdbtagid.h:153
#define TAG_DATA_DWORD
Definition: sdbtagid.h:87
TAGID Tagid
Definition: xml2sdb.h:115
void WriteString(TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:657
void WriteQWord(TAG tag, QWORD value, bool always=false)
Definition: xml2sdb.cpp:674
BOOL EndWriteListTag(TAGID tagid)
Definition: xml2sdb.cpp:690
TAGID BeginWriteListTag(TAG tag)
Definition: xml2sdb.cpp:685
void WriteDWord(TAG tag, DWORD value, bool always=false)
Definition: xml2sdb.cpp:668
#define TAG_NAME
Definition: vfat.h:553

Referenced by toSdb().

Member Data Documentation

◆ DataType

DWORD Data::DataType = 0

Definition at line 116 of file xml2sdb.h.

◆ DWordData

DWORD Data::DWordData = 0

Definition at line 119 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ m_index

int Data::m_index
private

Definition at line 87 of file sort_test.cpp.

Referenced by operator==().

◆ m_value

int Data::m_value
private

Definition at line 87 of file sort_test.cpp.

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

◆ Name

std::string Data::Name

Definition at line 114 of file xml2sdb.h.

Referenced by fromXml(), RegpCopyTree(), SeiCreateShimModuleInfo(), and toSdb().

◆ QWordData

QWORD Data::QWordData = 0

Definition at line 120 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ StringData

std::string Data::StringData

Definition at line 118 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Tagid

TAGID Data::Tagid = 0

Definition at line 115 of file xml2sdb.h.

Referenced by toSdb().


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