ReactOS 0.4.17-dev-1190-g4c812f4
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:64

Referenced by ExpValidateNlsLocaleData(), and RXactpCommit().

Member Function Documentation

◆ fromXml()

bool Data::fromXml ( XMLHandle  dbNode)

Definition at line 490 of file xml2sdb.cpp.

491{
492 Name = ReadStringNode(dbNode, "NAME");
493
494 StringData = ReadStringNode(dbNode, "DATA_STRING");
495 if (!StringData.empty())
496 {
498 return !Name.empty();
499 }
500 DWordData = ReadDWordNode(dbNode, "DATA_DWORD");
501 if (DWordData)
502 {
504 return !Name.empty();
505 }
506 QWordData = ReadQWordNode(dbNode, "DATA_QWORD");
507 if (QWordData)
508 {
510 return !Name.empty();
511 }
512
513 SHIM_ERR("Data node (%s) without value!\n", Name.c_str());
514 return false;
515}
#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:120
DWORD DWordData
Definition: xml2sdb.h:125
std::string StringData
Definition: xml2sdb.h:124
QWORD QWordData
Definition: xml2sdb.h:126
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 517 of file xml2sdb.cpp.

518{
520 db.WriteString(TAG_NAME, Name, true);
522 switch (DataType)
523 {
524 case REG_SZ:
526 break;
527 case REG_DWORD:
529 break;
530 case REG_QWORD:
532 break;
533 default:
534 SHIM_ERR("Data node (%s) with unknown type (0x%x)\n", Name.c_str(), DataType);
535 return false;
536 }
537
538 return !!db.EndWriteListTag(Tagid);
539}
#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:121
void WriteString(TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:688
void WriteQWord(TAG tag, QWORD value, bool always=false)
Definition: xml2sdb.cpp:705
BOOL EndWriteListTag(TAGID tagid)
Definition: xml2sdb.cpp:721
TAGID BeginWriteListTag(TAG tag)
Definition: xml2sdb.cpp:716
void WriteDWord(TAG tag, DWORD value, bool always=false)
Definition: xml2sdb.cpp:699
#define TAG_NAME
Definition: vfat.h:553

Referenced by toSdb().

Member Data Documentation

◆ DataType

DWORD Data::DataType = 0

Definition at line 122 of file xml2sdb.h.

◆ DWordData

DWORD Data::DWordData = 0

Definition at line 125 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 120 of file xml2sdb.h.

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

◆ QWordData

QWORD Data::QWordData = 0

Definition at line 126 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ StringData

std::string Data::StringData

Definition at line 124 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Tagid

TAGID Data::Tagid = 0

Definition at line 121 of file xml2sdb.h.

Referenced by toSdb().


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