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.
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< DataType > | getDataType () 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< Track > | getTrack (const XML::Element &) throw (FormatException) |
static SmartPtr< TimeHeightTrendData > | getTimeHeightTrend (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... |
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.
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) |
const std::string& code::XMLDecoder::getElementName | ( | ) | const |
static SmartPtr<TimeHeightTrendData> code::XMLDecoder::getTimeHeightTrend | ( | const XML::Element & | ) | throw (FormatException) [static] |
static SmartPtr<Track> code::XMLDecoder::getTrack | ( | const XML::Element & | ) | throw (FormatException) [static] |