Classdesc  3.D29
xml_unpack_t Class Reference

#include <xml_unpack_base.h>

Collaboration diagram for xml_unpack_t:
Collaboration graph

Public Member Functions

 xml_unpack_t (const char *fname)
 
template<class Stream >
 xml_unpack_t (Stream &i)
 
template<class Stream >
void process_attribute (XMLtoken< Stream > &i, const std::string &scope)
 
template<class Stream >
void parse (Stream &i)
 
template<class Stream >
void parse (XMLtoken< Stream > &stream, const std::string &scope)
 
void printContentMap () const
 dump XML contents for debugging
 
template<class T >
void unpack (std::string key, T &var)
 simple data type deserialisation
 
void unpack (std::string key, bool &var)
 
void unpack (std::string key, std::string &var)
 string deserialisation
 
bool exists (const std::string &key)
 checks for existence of token unpacked from XML stream
 
size_t count (std::string key)
 returns number of array elements with prefix key
 
void clear ()
 

Public Attributes

bool missingException
 

Friends

struct classdesc_access::access_pack< xml_unpack_t >
 
struct classdesc_access::access_unpack< xml_unpack_t >
 

Detailed Description

XML deserialisation object

Member Function Documentation

void parse ( Stream &  i)

parse an input XML file, into the database Stream is either std::istream or a FILE*

void process_attribute ( XMLtoken< Stream > &  stream,
const std::string &  scope 
)

parse XML attribute string from XML stream

Member Data Documentation

bool missingException

set this to true if you wish an exception to be thrown if data is missing from the XML stream


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