code::XMLDecoder Class Reference

List of all members.

Detailed Description

The XMLDecoder allows you to use a XML DOM node in memory to create many of the classes in the system.

These include low-level classes like Location and Angle as well as high-level classes such as DataTable.

Typical usage is like this:

     try{
       XMLDecoder input( xmlstring );
       DataTable dt;
       input.fillObjectValue( input.getDomElement(), dt );
     } catch ( XMLDecoder::FormatException& e ){
       std::cerr << "Error in: " << e.getErrorElement() << "\n";
       ...
     }
     

The fillObjectValue methods fill in the appropriate objects, throwing an Exception in case there is a parse error or if an expected XML element is not present.

See also:
XMLOutputter

Reader

Author:
Lakshman
Version:
Id
code_XMLDecoder.h,v 1.14 2009/06/02 20:17:37 lakshman Exp


Public Member Functions

 XMLDecoder (const std::string &xmlString) throw (FormatException)
 Pass in the text form of the XML string.
 XMLDecoder (Buffer &buf) throw (FormatException)
 Pass in the text form of the XML string.
SmartPtr< DataTypegetDataType () throw (FormatException)
const std::string & getElementName () const

Static Public Member Functions

static void fillObjectValue (const XML::Element &, Location &) throw (FormatException)
static void fillObjectValue (const XML::Element &, Angle &) throw (FormatException)
static void fillObjectValue (const XML::Element &, Length &) throw (FormatException)
static void fillObjectValue (const XML::Element &, DataTable &) throw (FormatException)
static void fillObjectValue (const XML::Element &, SpaceTimeRef &) throw (FormatException)
static void fillObjectValue (const XML::Element &, Time &) throw (FormatException)
static void fillObjectValue (const XML::Element &, DataColumn &) throw (FormatException)
static void fillObjectValue (const XML::Element &, DataCell &) throw (FormatException)
static SmartPtr< TrackgetTrack (const XML::Element &) throw (FormatException)
static SmartPtr< TimeHeightTrendDatagetTimeHeightTrend (const XML::Element &) throw (FormatException)
static void fillObjectValue (const XML::Element &, TimeHeightTrendData::Entry &obj) throw (FormatException)
static void fillObjectValue (const XML::Element &, Radial &obj) throw (FormatException)
static void fillObjectValue (const XML::Element &, RadialSet &obj) throw (FormatException)
static void fillObjectValue (const XML::Element &, SingleContourData &obj) throw (FormatException)
static void fillObjectValue (const XML::Element &, ContourData &obj) throw (FormatException)
static void fillObjectValue (const XML::Element &, double &itemvalue) throw (FormatException)
static void fillObjectValue (const XML::Element &e, float &itemvalue) throw (FormatException)
static void fillObjectValue (const XML::Element &e, short &itemvalue) throw (FormatException)
static void fillObjectValue (const XML::Element &, int &itemvalue) throw (FormatException)
static void fillObjectValue (const XML::Element &, std::string &itemvalue) throw (FormatException)

Classes

class  FormatException
 Thrown by the XML decoder if there is a format problem, for example, if an expected tag is not present in the XML input. More...


Constructor & Destructor Documentation

code::XMLDecoder::XMLDecoder ( const std::string &  xmlString  )  throw (FormatException)

Pass in the text form of the XML string.

code::XMLDecoder::XMLDecoder ( Buffer buf  )  throw (FormatException)

Pass in the text form of the XML string.

The only possible change made to the buffer passed in would be to append a '' (a null) character to terminate the string if needed.


Member Function Documentation

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
std::string &  itemvalue 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
int &  itemvalue 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element e,
short &  itemvalue 
) throw (FormatException) [inline, static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element e,
float &  itemvalue 
) throw (FormatException) [inline, static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
double &  itemvalue 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
ContourData obj 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
SingleContourData obj 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
RadialSet obj 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
Radial obj 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
TimeHeightTrendData::Entry obj 
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
DataCell  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
DataColumn  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
Time  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
SpaceTimeRef  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
DataTable  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
Length  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
Angle  
) throw (FormatException) [static]

static void code::XMLDecoder::fillObjectValue ( const XML::Element ,
Location  
) throw (FormatException) [static]

SmartPtr< DataType > code::XMLDecoder::getDataType (  )  throw (FormatException)

Returns:
the DataType encoded in this document, 0 if the tag of the root element is not recognized.

const std::string& code::XMLDecoder::getElementName (  )  const

Returns:
the type of element referred to by the XML text.

static SmartPtr<TimeHeightTrendData> code::XMLDecoder::getTimeHeightTrend ( const XML::Element  )  throw (FormatException) [static]

static SmartPtr<Track> code::XMLDecoder::getTrack ( const XML::Element  )  throw (FormatException) [static]


Generated on Fri May 4 13:40:11 2012 for WDSS-IIw2 by  doxygen 1.4.7