ICP  1
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LabviewXML Class Reference

#include <labview_xml.h>

Classes

struct  labview_item
 

Public Member Functions

int loadFromString (BSTR xml_string, DAEstatus &status)
 
int loadFromString (const char *xml_string, DAEstatus &status)
 
int saveToString (std::string &s, DAEstatus &status)
 
int loadFromFile (const char *filename, DAEstatus &status)
 
int saveToFile (const char *filename, DAEstatus &status)
 
int updateFrom (const LabviewXML &lvxml, DAEstatus &status)
 
int updateFromString (const std::string &xml_string, DAEstatus &status)
 
int updateFromString (const char *xml_chars, DAEstatus &status)
 
int setValue (const char *name, const char *value, DAEstatus &status)
 
int setValue (const char *name, double value, DAEstatus &status)
 
int setValue (const char *name, long value, DAEstatus &status)
 
int setValue (const char *name, int value, DAEstatus &status)
 
int setValue (const char *name, unsigned long value, DAEstatus &status)
 
int setValue (const char *name, unsigned int value, DAEstatus &status)
 
int setValue (const char *name, __int64 value, DAEstatus &status)
 
int setValue (const char *name, const std::vector< std::string > &value, DAEstatus &status)
 
int getValue (const char *name, char *value, int max_len, bool write_null, DAEstatus &status)
 
int getValue (const char *name, std::string &value, DAEstatus &status)
 
int getValue (const char *name, double &value, DAEstatus &status)
 
int getValue (const char *name, float &value, DAEstatus &status)
 
int getValue (const char *name, long &value, DAEstatus &status)
 
int getValue (const char *name, int &value, DAEstatus &status)
 
int getValue (const char *name, __int64 &value, DAEstatus &status)
 
int getValue (const char *name, std::vector< std::string > &value, DAEstatus &status)
 
std::string valueAsString (const char *name, DAEstatus &status)
 
 LabviewXML (DAEstatus &status)
 
int close ()
 
 ~LabviewXML ()
 

Protected Member Functions

int processElements (int type, bool reading, DAEstatus &status)
 
int processAllElements (bool reading, DAEstatus &status)
 
int DomFromCOM (DAEstatus &status)
 
int setISO8859Encoding (DAEstatus &status)
 

Private Types

typedef std::map< std::string,
labview_item
list_t
 
typedef std::pair
< list_t::iterator, bool > 
insert_t
 
typedef list_t::iterator iterator_t
 
typedef list_t::const_iterator c_iterator_t
 

Private Member Functions

 LabviewXML ()
 

Private Attributes

IXMLDOMDocument * m_pxmldom
 
list_t m_list
 

Detailed Description

Definition at line 21 of file labview_xml.h.

Member Typedef Documentation

typedef list_t::const_iterator LabviewXML::c_iterator_t
private

Definition at line 34 of file labview_xml.h.

typedef std::pair<list_t::iterator,bool> LabviewXML::insert_t
private

Definition at line 32 of file labview_xml.h.

typedef list_t::iterator LabviewXML::iterator_t
private

Definition at line 33 of file labview_xml.h.

typedef std::map<std::string, labview_item> LabviewXML::list_t
private

Definition at line 31 of file labview_xml.h.

Constructor & Destructor Documentation

LabviewXML::LabviewXML ( DAEstatus status)
inline

Definition at line 69 of file labview_xml.h.

References DomFromCOM().

LabviewXML::~LabviewXML ( )
inline

Definition at line 71 of file labview_xml.h.

References close().

LabviewXML::LabviewXML ( )
private

Definition at line 184 of file labview_xml.cpp.

References m_pxmldom.

Member Function Documentation

int LabviewXML::close ( )
inline

Definition at line 70 of file labview_xml.h.

References m_pxmldom.

Referenced by _tmain(), and ~LabviewXML().

int LabviewXML::DomFromCOM ( DAEstatus status)
protected

Definition at line 193 of file labview_xml.cpp.

References DAEstatus::Failure, m_pxmldom, STATUS_CHECK_HR, and DAEstatus::Success.

Referenced by LabviewXML().

int LabviewXML::getValue ( const char *  name,
char *  value,
int  max_len,
bool  write_null,
DAEstatus status 
)
int LabviewXML::getValue ( const char *  name,
std::string &  value,
DAEstatus status 
)
int LabviewXML::getValue ( const char *  name,
double &  value,
DAEstatus status 
)

Definition at line 425 of file labview_xml.cpp.

References getValue().

int LabviewXML::getValue ( const char *  name,
float &  value,
DAEstatus status 
)

Definition at line 433 of file labview_xml.cpp.

References getValue().

int LabviewXML::getValue ( const char *  name,
long &  value,
DAEstatus status 
)

Definition at line 441 of file labview_xml.cpp.

References getValue().

int LabviewXML::getValue ( const char *  name,
int &  value,
DAEstatus status 
)

Definition at line 458 of file labview_xml.cpp.

References getValue().

int LabviewXML::getValue ( const char *  name,
__int64 &  value,
DAEstatus status 
)

Definition at line 450 of file labview_xml.cpp.

References getValue().

int LabviewXML::getValue ( const char *  name,
std::vector< std::string > &  value,
DAEstatus status 
)
int LabviewXML::loadFromFile ( const char *  filename,
DAEstatus status 
)
int LabviewXML::loadFromString ( BSTR  xml_string,
DAEstatus status 
)
int LabviewXML::loadFromString ( const char *  xml_string,
DAEstatus status 
)

Definition at line 611 of file labview_xml.cpp.

References loadFromString().

int LabviewXML::processAllElements ( bool  reading,
DAEstatus status 
)
protected

Definition at line 216 of file labview_xml.cpp.

References n_lv, and processElements().

Referenced by loadFromString(), saveToFile(), and saveToString().

int LabviewXML::processElements ( int  type,
bool  reading,
DAEstatus status 
)
protected
int LabviewXML::saveToFile ( const char *  filename,
DAEstatus status 
)

Definition at line 561 of file labview_xml.cpp.

References m_pxmldom, and processAllElements().

Referenced by _tmain().

int LabviewXML::saveToString ( std::string &  s,
DAEstatus status 
)
int LabviewXML::setISO8859Encoding ( DAEstatus status)
protected
int LabviewXML::setValue ( const char *  name,
const char *  value,
DAEstatus status 
)
int LabviewXML::setValue ( const char *  name,
double  value,
DAEstatus status 
)

Definition at line 378 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
long  value,
DAEstatus status 
)

Definition at line 342 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
int  value,
DAEstatus status 
)

Definition at line 370 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
unsigned long  value,
DAEstatus status 
)

Definition at line 363 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
unsigned int  value,
DAEstatus status 
)

Definition at line 356 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
__int64  value,
DAEstatus status 
)

Definition at line 349 of file labview_xml.cpp.

References setValue().

int LabviewXML::setValue ( const char *  name,
const std::vector< std::string > &  value,
DAEstatus status 
)

Definition at line 385 of file labview_xml.cpp.

References DAEstatus::addVa(), ERRTYPE_OUTOFMEM, FAC_DAE, m_list, and SEV_ERROR.

int LabviewXML::updateFrom ( const LabviewXML lvxml,
DAEstatus status 
)

Definition at line 697 of file labview_xml.cpp.

References m_list, setValue(), and DAEstatus::Success.

Referenced by updateFromString().

int LabviewXML::updateFromString ( const std::string &  xml_string,
DAEstatus status 
)
int LabviewXML::updateFromString ( const char *  xml_chars,
DAEstatus status 
)
std::string LabviewXML::valueAsString ( const char *  name,
DAEstatus status 
)

Definition at line 418 of file labview_xml.cpp.

References getValue().

Member Data Documentation

list_t LabviewXML::m_list
private

Definition at line 35 of file labview_xml.h.

Referenced by getValue(), processElements(), setValue(), and updateFrom().

IXMLDOMDocument* LabviewXML::m_pxmldom
private

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