ReactOS  0.4.14-dev-583-g2a1ba2c
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.

79  : m_index(index), m_value(value) {}
int m_index
Definition: sort_test.cpp:87
GLuint index
Definition: glext.h:6031
int m_value
Definition: sort_test.cpp:87

Referenced by BiConvertBcdElements().

◆ Data() [2/2]

Data::Data ( )
inline

Definition at line 96 of file xml2sdb.h.

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

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  {
420  DataType = REG_SZ;
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 }
DWORD ReadDWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:103
QWORD QWordData
Definition: xml2sdb.h:107
#define REG_SZ
Definition: xml2sdb.cpp:406
DWORD DataType
Definition: xml2sdb.h:103
std::string ReadStringNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:79
#define REG_QWORD
Definition: xml2sdb.cpp:409
DWORD DWordData
Definition: xml2sdb.h:106
std::string StringData
Definition: xml2sdb.h:105
#define REG_DWORD
Definition: xml2sdb.cpp:408
DWORD ReadQWordNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:91

◆ 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
int m_value
Definition: sort_test.cpp:87

◆ 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; }
int other
Definition: msacm.c:1376
int m_index
Definition: sort_test.cpp:87
int m_value
Definition: sort_test.cpp:87

◆ 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 }
#define TAG_NAME
Definition: vfat.h:547
static PDB pdb
Definition: db.cpp:170
TAGID BeginWriteListTag(PDB pdb, TAG tag)
Definition: xml2sdb.cpp:624
QWORD QWordData
Definition: xml2sdb.h:107
void WriteQWord(PDB pdb, TAG tag, QWORD value, bool always=false)
Definition: xml2sdb.cpp:618
#define TAG_DATA_VALUETYPE
Definition: sdbtagid.h:86
#define REG_SZ
Definition: xml2sdb.cpp:406
DWORD DataType
Definition: xml2sdb.h:103
void WriteString(PDB pdb, TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:601
#define REG_QWORD
Definition: xml2sdb.cpp:409
#define TAG_DATA_DWORD
Definition: sdbtagid.h:87
BOOL EndWriteListTag(PDB pdb, TAGID tagid)
Definition: xml2sdb.cpp:629
#define TAG_DATA_QWORD
Definition: sdbtagid.h:116
TAGID Tagid
Definition: xml2sdb.h:102
DWORD DWordData
Definition: xml2sdb.h:106
#define TAG_DATA_STRING
Definition: sdbtagid.h:153
#define TAG_DATA
Definition: db.cpp:91
void WriteDWord(PDB pdb, TAG tag, DWORD value, bool always=false)
Definition: xml2sdb.cpp:612
std::string StringData
Definition: xml2sdb.h:105
#define REG_DWORD
Definition: xml2sdb.cpp:408

Member Data Documentation

◆ DataType

DWORD Data::DataType

Definition at line 103 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ 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.

◆ m_value

int Data::m_value
private

Definition at line 87 of file sort_test.cpp.

◆ Name

std::string Data::Name

Definition at line 101 of file xml2sdb.h.

Referenced by 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: