Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SmbiosXml.cpp File Reference

#include "smbios/compat.h"
#include <sstream>
#include <iomanip>
#include "SmbiosXmlImpl.h"
#include "StdSmbiosXml.h"
#include "FactoryImpl2.h"
#include "XmlUtils.h"
#include "smbios/message.h"

Go to the source code of this file.

Namespaces

namespace  smbios

Classes

class  SmbiosXmlFactoryImpl

Defines

#define LIBSMBIOS_SOURCE
#define DCOUT(line)   do {} while(0)
#define DCERR(line)   do {} while(0)

Functions

DOMDocument * getSmbiosXmlDoc (DOMBuilder *parser, std::string &xmlFile)
void validateSmbiosXmlDoc (DOMDocument *doc)
unsigned int parseLengthStr (string size)
void verifyElementAttr (const DOMElement *element, const string elementName, const string value)
void verifyElementAttr (const DOMElement *element, const string elementName, unsigned int size)
int getTypeForString (DOMDocument *doc, const string searchForDesc)
const string getStringForType (const DOMDocument *doc, const int searchForType)
void getData_UsingXml (const ISmbiosItem &item, const string fieldName, void *out, size_t size)
void * getBits_FromItem (const ISmbiosItem &item, const string field, const string bitField, void *out)
void printStructureField (std::ostream &cout, const DOMNode *node, const ISmbiosItem &item)
std::ostream & toXmlString (const ISmbiosTable &table, ostream &cout)


Define Documentation

#define DCERR line   )     do {} while(0)
 

Definition at line 46 of file SmbiosXml.cpp.

#define DCOUT line   )     do {} while(0)
 

Definition at line 45 of file SmbiosXml.cpp.

#define LIBSMBIOS_SOURCE
 

Definition at line 20 of file SmbiosXml.cpp.


Function Documentation

void* getBits_FromItem const ISmbiosItem &  item,
const string  field,
const string  bitField,
void *  out
 

Definition at line 404 of file SmbiosXml.cpp.

References DOMDocument, DOMElement, xmlutils::findElement(), xmlutils::findElementWithNumericAttr(), smbios::getBits_FromItem(), SmbiosFactory::getFactory(), xmlutils::getNumberFromXmlAttr(), SmbiosFactory::getSingleton(), ISmbiosItem::getType(), SmbiosTableXml::getXmlDoc(), and xmlDocGetRootElement.

Referenced by testStandalone::testItem_GetBiosInfo(), and testStandalone::testTypeMismatch().

void getData_UsingXml const ISmbiosItem &  item,
const string  fieldName,
void *  out,
size_t  size
[static]
 

Definition at line 325 of file SmbiosXml.cpp.

References DOMDocument, DOMElement, xmlutils::findElement(), xmlutils::findElementWithNumericAttr(), ISmbiosItem::getData(), SmbiosFactory::getFactory(), xmlutils::getNumberFromXmlAttr(), SmbiosFactory::getSingleton(), ISmbiosItem::getType(), SmbiosTableXml::getXmlDoc(), smbios::verifyElementAttr(), and xmlDocGetRootElement.

Referenced by smbios::getU16_FromItem(), smbios::getU32_FromItem(), smbios::getU64_FromItem(), and smbios::getU8_FromItem().

DOMDocument* getSmbiosXmlDoc DOMBuilder *  parser,
std::string &  xmlFile
 

Definition at line 113 of file SmbiosXml.cpp.

References compatXmlReadFile, compatXmlReadMemory, DCERR, DOMDocument, and stdXml.

Referenced by SmbiosTableXml::setXmlFilePath().

const string getStringForType const DOMDocument *  doc,
const int  searchForType
 

Definition at line 198 of file SmbiosXml.cpp.

References DOMElement, xmlutils::findElement(), xmlutils::findElementWithNumericAttr(), xmlutils::safeGetAttribute(), and xmlDocGetRootElement.

Referenced by SmbiosTableXml::getStringForType().

int getTypeForString DOMDocument *  doc,
const string  searchForDesc
 

Definition at line 189 of file SmbiosXml.cpp.

References DOMElement, xmlutils::findElement(), xmlutils::safeGetAttribute(), and xmlDocGetRootElement.

Referenced by SmbiosTableXml::getTypeForString().

unsigned int parseLengthStr string  size  ) 
 

Definition at line 158 of file SmbiosXml.cpp.

Referenced by smbios::printStructureField(), and smbios::verifyElementAttr().

void printStructureField std::ostream &  cout,
const DOMNode *  node,
const ISmbiosItem &  item
 

Definition at line 438 of file SmbiosXml.cpp.

References smbios::getString_FromItem(), smbios::getU8_FromItem(), smbios::parseLengthStr(), and xmlutils::safeGetAttribute().

std::ostream& toXmlString const ISmbiosTable &  table,
ostream &  cout
 

Definition at line 503 of file SmbiosXml.cpp.

References UNREFERENCED_PARAMETER.

void validateSmbiosXmlDoc DOMDocument *  doc  ) 
 

Definition at line 139 of file SmbiosXml.cpp.

References xmlDocGetRootElement, and xmlFreeDoc.

Referenced by SmbiosTableXml::setXmlFilePath().

void verifyElementAttr const DOMElement *  element,
const string  elementName,
unsigned int  size
 

Definition at line 182 of file SmbiosXml.cpp.

References smbios::parseLengthStr(), and xmlutils::safeGetAttribute().

void verifyElementAttr const DOMElement *  element,
const string  elementName,
const string  value
 

Definition at line 174 of file SmbiosXml.cpp.

References xmlutils::safeGetAttribute().

Referenced by smbios::getData_UsingXml(), and smbios::getString_FromItem().


Generated on Thu Jun 21 02:49:21 2007 for SMBIOS Library by  doxygen 1.3.9.1