xml::xsilHandler Class Reference
[Input parsing classes.]

#include <Xsil.hh>

Inheritance diagram for xml::xsilHandler:

xml::xsilHandlerFSpectrum xml::xsilHandlerHistogram xml::xsilHandlerTSeries xml::xsilHandlerUnknown

List of all members.

Public Types

typedef std::map< std::string,
std::string > 
attrlist
 Attribute list.

Public Member Functions

 xsilHandler (bool ignore=false)
 Constructor.
virtual ~xsilHandler ()
 Destructor.
virtual bool CommentHandler (const std::string &comment)
 comment callback
virtual bool ParameterHandler (int type, void *x, int size, const attrlist &attr)
 parameter callback (will call correct type)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const bool &p, int N=1)
 bool parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const char &p, int N=1)
 byte parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const short &p, int N=1)
 short parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const int &p, int N=1)
 int parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const long long &p, int N=1)
 long parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const float &p, int N=1)
 float parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const double &p, int N=1)
 double parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const std::complex< float > &p, int N=1)
 complex float parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const std::complex< double > &p, int N=1)
 complex double parameter callback (must return true if handled)
virtual bool HandleParameter (const std::string &name, const attrlist &attr, const std::string &p)
 string parameter callback (must return true if handled)
virtual bool HandleTime (const std::string &name, const attrlist &attr, unsigned long sec, unsigned long nsec)
 time callback (must return true if handled)
virtual bool DataHandler (const std::string &name, int type, void *x, int size, int dim1, int dim2=0, int dim3=0, int dim4=0)
 data callback (must return true if data was adopted)
virtual bool HandleData (const std::string &name, float *x, int dim1, int dim2=0, int dim3=0, int dim4=0)
 data callback (must return true if data is adopted)
virtual bool HandleData (const std::string &name, std::complex< float > *x, int dim1, int dim2=0, int dim3=0, int dim4=0)
 data callback (must return true if data is adopted)
virtual bool HandleData (const std::string &name, double *x, int dim1, int dim2=0, int dim3=0, int dim4=0)
 data callback (must return true if data is adopted)
virtual bool HandleData (const std::string &name, std::complex< double > *x, int dim1, int dim2=0, int dim3=0, int dim4=0)
 data callback (must return true if data is adopted)
virtual bool HandleTableColumn (int col, const std::string &name, int type, const attrlist &attr)
 table column callback
virtual bool TableEntryHandler (int row, int col, int type, void *x)
 table entry callback (will call correct type)
virtual bool HandleTableEntry (int row, int col, bool p)
 bool table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, char p)
 byte table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, short p)
 short table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, int p)
 int table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, long long p)
 long table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, float p)
 float table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, double p)
 double table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, const std::complex< float > &p)
 complex float table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, const std::complex< double > &p)
 complex double table entry callback (must return true if handled)
virtual bool HandleTableEntry (int row, int col, const Time &p)
 Time table entry callback (must return true if handled).
virtual bool HandleTableEntry (int row, int col, const std::string &p)
 string table entry callback (must return true if handled)
virtual xsilHandlerGetHandler (const attrlist &attr)
 handler for nested data objects (0 for none)
virtual xsilHandlerGetTableHandler (const attrlist &attr)
 handler for nested table (0 for none)

Protected Attributes

bool fIgnoreNested
 True if nested data objects should be ignored.
std::string fComment
 Comment string.
std::string fUnit
 Unit string.


Detailed Description

Xsil callback class. This is the callback handler which is constructed by a handler query object of the corresponding xsil data object. The user has to define a xsilHandler class derived from this one for each type of xsil object intended for parsing. The following automatic type conversions are supported for parameters and table entries: {verbatim} char -> short -> int -> long long short -> int -> long long int -> long long long long -> int float -> double double -> float complex float -> complex double complex double -> complex float {verbatim} The native type is always tried first and the conversion process stops with the first handler returning true.

For tables the column handler is called for each column definition using a column index starting at zero. The column handler is then called again with a column index of -1 and an empty name to indicate that the last column defintion has been read. Subsequently, the table entry handler is called for each table cell. The table entry handler has the column and row index as an argument.

brief Xsil callback handler.

Author:
Written June 2000 by Daniel Sigg
Version:
1.0

The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:44 2009 for dmt by  doxygen 1.5.4