Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
drwnXMLUtils.h File Reference

Provides utility functions for XML parsing. More...

Go to the source code of this file.

Classes

struct  drwnXMLUtils::save_node< T >
 helper class for saving objects to xml nodes More...
 
struct  drwnXMLUtils::save_node< T * >
 helper class for saving pointers to objects to xml nodes More...
 
struct  drwnXMLUtils::load_node< T >
 helper class for loading xml nodes into containers of objects More...
 
struct  drwnXMLUtils::load_node< T * >
 helper class for (creating and) loading xml nodes into containers of pointers to objects More...
 

Typedefs

typedef enum _drwnXMLEncoderType drwnXMLEncoderType
 

Enumerations

enum  _drwnXMLEncoderType { DRWN_XML_TEXT, DRWN_XML_BASE64 }
 

Functions

char * drwnBase64::encode (const unsigned char *data, size_t length)
 Encodes a binary sequence as a NULL terminated base64 string. The calling function takes ownership and must delete the string.
 
unsigned char * drwnBase64::decode (const char *data)
 Decode a NULL terminated base64 string to binary. The calling function takes ownership and must delete the binary array.
 
drwnXMLEncoderType drwnXMLUtils::getEncoderType (const char *str)
 converts string into encoder type
 
drwnXMLNode & drwnXMLUtils::serialize (drwnXMLNode &xml, const char *buffer, size_t length)
 xml serialization of a byte array
 
drwnXMLNode & drwnXMLUtils::serialize (drwnXMLNode &xml, const Eigen::VectorXd &v)
 xml serialization of a double-precision vector
 
drwnXMLNode & drwnXMLUtils::serialize (drwnXMLNode &xml, const Eigen::MatrixXd &m)
 xml serialization of a double-precision matrix
 
drwnXMLNode & drwnXMLUtils::deserialize (drwnXMLNode &xml, char *buffer, size_t length)
 xml de-serialization of a byte array
 
drwnXMLNode & drwnXMLUtils::deserialize (drwnXMLNode &xml, Eigen::VectorXd &v)
 xml de-serialization of a double-precision vector
 
drwnXMLNode & drwnXMLUtils::deserialize (drwnXMLNode &xml, Eigen::MatrixXd &m)
 xml de-serialization of a double-precision matrix
 
template<class RandomAccessIterator >
void drwnXMLUtils::save (drwnXMLNode &xml, const char *tag, RandomAccessIterator first, RandomAccessIterator last)
 save container contents in range [first, last). Contained type must itself have, or be a pointer to a type with, a save(drwnXMLNode&) method
 
template<class Container >
void drwnXMLUtils::save (drwnXMLNode &xml, const char *tag, const Container &container)
 serialize entire container to xml node. Contained type must itself have, or be a pointer to a class with, a save(drwnXMLNode&) const method.
 
template<class Container >
void drwnXMLUtils::write (const char *filename, const char *root, const char *tag, const Container &container)
 serialize entire container to an xml file. Contained type must itself have, or be a pointer to a class with, a save(drwnXMLNode&) const method.
 
template<class Container >
void drwnXMLUtils::load (drwnXMLNode &xml, const char *tag, Container &container)
 de-serialize an xml node into container. The container type must itself be, or be a pointer to a type that is, default constructable and have a load(drwnXMLNode&) method.
 
template<class Container >
void drwnXMLUtils::read (const char *filename, const char *root, const char *tag, Container &container)
 de-serialize an xml file into container. The container type must be default constructable and have a load(drwnXMLNode&) method.
 
void drwnXMLUtils::dump (drwnXMLNode &xml)
 prints an XML node to standard output for debugging
 

Variables

const char * drwnBase64::LUT
 base 64 encoding lookup table More...
 
const char drwnBase64::FILL = '='
 base 64 filler
 
bool drwnBase64::INSERT_NEWLINES = false
 insert newlines to produce 80-column output when encoding
 
drwnXMLEncoderType drwnXMLUtils::DEFAULT_ENCODER = DRWN_XML_BASE64
 default encoding mode for binary objects
 

Detailed Description

Provides utility functions for XML parsing.

See Also
drwnXMLParser
XML Utilities

Enumeration Type Documentation

Enumerator
DRWN_XML_TEXT 

encode binary objects as ASCII text

DRWN_XML_BASE64 

encode binary objects using Base-64