ReactOS 0.4.16-dev-334-g4d9f67c
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
 
 Data ()
 
bool fromXml (XMLHandle dbNode)
 
bool toSdb (PDB pdb, Database &db)
 

Public Attributes

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

Private Attributes

int m_index
 
int m_value
 

Detailed Description

Definition at line 77 of file sort_test.cpp.

Constructor & Destructor Documentation

◆ Data() [1/2]

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:94

Referenced by BiConvertBcdElements(), and ExpValidateNlsLocaleData().

◆ Data() [2/2]

Data::Data ( )
inline

Definition at line 96 of file xml2sdb.h.

96: Tagid(0), DataType(0), DWordData(0), QWordData(0) { ; }
DWORD DataType
Definition: xml2sdb.h:103
DWORD DWordData
Definition: xml2sdb.h:106
QWORD QWordData
Definition: xml2sdb.h:107
TAGID Tagid
Definition: xml2sdb.h:102

Member Function Documentation

◆ fromXml()

bool Data::fromXml ( XMLHandle  dbNode)

Definition at line 413 of file xml2sdb.cpp.

414{
415 Name = ReadStringNode(dbNode, "NAME");
416
417 StringData = ReadStringNode(dbNode, "DATA_STRING");
418 if (!StringData.empty())
419 {
421 return !Name.empty();
422 }
423 DWordData = ReadDWordNode(dbNode, "DATA_DWORD");
424 if (DWordData)
425 {
427 return !Name.empty();
428 }
429 QWordData = ReadQWordNode(dbNode, "DATA_QWORD");
430 if (QWordData)
431 {
433 return !Name.empty();
434 }
435
436 SHIM_ERR("Data node (%s) without value!\n", Name.c_str());
437 return false;
438}
#define REG_SZ
Definition: layer.c:22
#define REG_QWORD
Definition: sdbapi.c:597
#define REG_DWORD
Definition: sdbapi.c:596
#define SHIM_ERR(fmt,...)
Definition: sdbpapi.h:76
DataType
Definition: simd.h:252
std::string StringData
Definition: xml2sdb.h:105
DWORD ReadDWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:103
DWORD ReadQWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:91
std::string ReadStringNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:79

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 ( PDB  pdb,
Database db 
)

Definition at line 440 of file xml2sdb.cpp.

441{
443 db.WriteString(pdb, TAG_NAME, Name, true);
445 switch (DataType)
446 {
447 case REG_SZ:
449 break;
450 case REG_DWORD:
452 break;
453 case REG_QWORD:
455 break;
456 default:
457 SHIM_ERR("Data node (%s) with unknown type (0x%x)\n", Name.c_str(), DataType);
458 return false;
459 }
460
461 return !!db.EndWriteListTag(pdb, Tagid);
462}
static PDB pdb
Definition: db.cpp:172
#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
void WriteDWord(PDB pdb, TAG tag, DWORD value, bool always=false)
Definition: xml2sdb.cpp:612
BOOL EndWriteListTag(PDB pdb, TAGID tagid)
Definition: xml2sdb.cpp:629
void WriteQWord(PDB pdb, TAG tag, QWORD value, bool always=false)
Definition: xml2sdb.cpp:618
TAGID BeginWriteListTag(PDB pdb, TAG tag)
Definition: xml2sdb.cpp:624
void WriteString(PDB pdb, TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:601
#define TAG_NAME
Definition: vfat.h:553

Referenced by toSdb().

Member Data Documentation

◆ DataType

DWORD Data::DataType

Definition at line 103 of file xml2sdb.h.

◆ DWordData

DWORD Data::DWordData

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

Referenced by RegpCopyTree(), and SeiCreateShimModuleInfo().

◆ QWordData

QWORD Data::QWordData

Definition at line 107 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ StringData

std::string Data::StringData

Definition at line 105 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Tagid

TAGID Data::Tagid

Definition at line 102 of file xml2sdb.h.

Referenced by toSdb().


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