casa
$Rev:20696$
|
#include <asdm2MSGeneric.h>
Public Member Functions | |
TableSAXReader (bool verbose, RFilter &rFilter, TableFiller tableFiller_f_p, std::map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &msFillers_m) | |
An empty contructor. | |
~TableSAXReader () | |
The destructor. | |
void | operator() (const string &asdmDirectory, bool ignoreTime) |
It will be used as a functor. | |
Static Public Member Functions | |
static void | start_element_callback (void *v_p, const xmlChar *name, const xmlChar **attrs) |
Defines the action to perform when an event "opening tag" occurs. | |
static void | end_element_callback (void *v_p, const xmlChar *name) |
Defines the action to perform when an event "closing tag" occurs. | |
static void | characters_callback (void *v_p, const xmlChar *ch, int len) |
Defines the action to be performed while parsing any text outside of a tag. | |
Private Types | |
typedef void(* | TableFiller )(const vector< R * > &, map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &) |
Static Private Member Functions | |
static xmlSAXHandler | initSAXHandler () |
static void | error (const string &message) |
static void | unexpectedOpeningElement (const xmlChar *name, const xmlChar *expectedName) |
static void | unexpectedClosingElement (const xmlChar *name) |
static void | checkOpeningElement (const xmlChar *name, const xmlChar *expectedName) |
static void | checkClosingElement (const xmlChar *name, const xmlChar *expectedName) |
static void | enterElementInfo (void *v_p, const xmlChar *name) |
static void | exitElementInfo (void *v_p, const xmlChar *name) |
Private Attributes | |
bool | verbose |
ParserContext< T, R, RFilter > | myContext |
string | topLevelElement_s |
asdm::ASDM | asdm |
Static Private Attributes | |
static xmlSAXHandler | myHandler |
Definition at line 248 of file asdm2MSGeneric.h.
typedef void(* TableSAXReader< T, R, RFilter >::TableFiller)(const vector< R * > &, map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &) [private] |
Definition at line 250 of file asdm2MSGeneric.h.
TableSAXReader< T, R, RFilter >::TableSAXReader | ( | bool | verbose, |
RFilter & | rFilter, | ||
TableFiller | tableFiller_f_p, | ||
std::map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > & | msFillers_m | ||
) | [inline] |
An empty contructor.
The top level element name can be derived from the template parameter T.
Definition at line 256 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::asdm, casa::SynthesisUtils::getenv(), TableSAXReader< T, R, RFilter >::myContext, casa::name(), TableSAXReader< T, R, RFilter >::topLevelElement_s, and TableSAXReader< T, R, RFilter >::verbose.
TableSAXReader< T, R, RFilter >::~TableSAXReader | ( | ) | [inline] |
The destructor.
Definition at line 280 of file asdm2MSGeneric.h.
static void TableSAXReader< T, R, RFilter >::characters_callback | ( | void * | v_p, |
const xmlChar * | ch, | ||
int | len | ||
) | [inline, static] |
Defines the action to be performed while parsing any text outside of a tag.
Normally his occurs only when an attribute is parsed.
Definition at line 464 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::initSAXHandler().
static void TableSAXReader< T, R, RFilter >::checkClosingElement | ( | const xmlChar * | name, |
const xmlChar * | expectedName | ||
) | [inline, static, private] |
Definition at line 503 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::unexpectedClosingElement().
Referenced by TableSAXReader< T, R, RFilter >::end_element_callback().
static void TableSAXReader< T, R, RFilter >::checkOpeningElement | ( | const xmlChar * | name, |
const xmlChar * | expectedName | ||
) | [inline, static, private] |
Definition at line 499 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::unexpectedOpeningElement().
Referenced by TableSAXReader< T, R, RFilter >::start_element_callback().
static void TableSAXReader< T, R, RFilter >::end_element_callback | ( | void * | v_p, |
const xmlChar * | name | ||
) | [inline, static] |
Defines the action to perform when an event "closing tag" occurs.
We are right after a <row>..</row>
Possibly write some remainings rows by applying tableFiller on the vector.
Log a minimum of information about what has just happened.
Empty the vector before reading new rows.
We were in an <Entity> element.
We were in a <ContainerEntity> element.
We were in a <row>..</row> element.
Push the last parsed row into the vector.
If the size of this vector is equal to the maximum number allowed to reside in memory then proceed by applying tableFiller on on the vector and after that clear the vector.
Log a minimum of information about what has just happened.
We were in an element located in a <row>..</row>, which is normally an attribute.
Definition at line 359 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::checkClosingElement(), debug, TableSAXReader< T, R, RFilter >::error(), TableSAXReader< T, R, RFilter >::exitElementInfo(), getexepath(), casa::NORMAL, casa::dbus::path(), V2CTX_P, and WHERE.
Referenced by TableSAXReader< T, R, RFilter >::initSAXHandler().
static void TableSAXReader< T, R, RFilter >::enterElementInfo | ( | void * | v_p, |
const xmlChar * | name | ||
) | [inline, static, private] |
Definition at line 507 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::start_element_callback().
static void TableSAXReader< T, R, RFilter >::error | ( | const string & | message | ) | [inline, static, private] |
Definition at line 485 of file asdm2MSGeneric.h.
References casa::name().
Referenced by TableSAXReader< T, R, RFilter >::end_element_callback(), TableSAXReader< T, R, RFilter >::start_element_callback(), TableSAXReader< T, R, RFilter >::unexpectedClosingElement(), and TableSAXReader< T, R, RFilter >::unexpectedOpeningElement().
static void TableSAXReader< T, R, RFilter >::exitElementInfo | ( | void * | v_p, |
const xmlChar * | name | ||
) | [inline, static, private] |
Definition at line 511 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::end_element_callback().
static xmlSAXHandler TableSAXReader< T, R, RFilter >::initSAXHandler | ( | ) | [inline, static, private] |
Definition at line 477 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::characters_callback(), TableSAXReader< T, R, RFilter >::end_element_callback(), and TableSAXReader< T, R, RFilter >::start_element_callback().
void TableSAXReader< T, R, RFilter >::operator() | ( | const string & | asdmDirectory, |
bool | ignoreTime | ||
) | [inline] |
It will be used as a functor.
Definition at line 285 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::myContext, TableSAXReader< T, R, RFilter >::myHandler, and casa::name().
static void TableSAXReader< T, R, RFilter >::start_element_callback | ( | void * | v_p, |
const xmlChar * | name, | ||
const xmlChar ** | attrs | ||
) | [inline, static] |
Defines the action to perform when an event "opening tag" occurs.
We are right before the toplevel element of the XML document.
We are right after the toplevel element of the XML document.
We are right after the <Entity.../> element.
We are right after the <ContainerEntity.../> element or a <row>..</row> element.
We are inside a <row>...</row> but outside any element contained in that element.
We are inside a element contained in a <row>...</row> element.
Otherwise we have a problem.
Definition at line 295 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::checkOpeningElement(), debug, TableSAXReader< T, R, RFilter >::enterElementInfo(), TableSAXReader< T, R, RFilter >::error(), casa::name(), and V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::initSAXHandler().
static void TableSAXReader< T, R, RFilter >::unexpectedClosingElement | ( | const xmlChar * | name | ) | [inline, static, private] |
Definition at line 494 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::error().
Referenced by TableSAXReader< T, R, RFilter >::checkClosingElement().
static void TableSAXReader< T, R, RFilter >::unexpectedOpeningElement | ( | const xmlChar * | name, |
const xmlChar * | expectedName | ||
) | [inline, static, private] |
Definition at line 489 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::error().
Referenced by TableSAXReader< T, R, RFilter >::checkOpeningElement().
asdm::ASDM TableSAXReader< T, R, RFilter >::asdm [private] |
Definition at line 475 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().
ParserContext<T, R, RFilter> TableSAXReader< T, R, RFilter >::myContext [private] |
Definition at line 473 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::operator()(), and TableSAXReader< T, R, RFilter >::TableSAXReader().
xmlSAXHandler TableSAXReader< T, R, RFilter >::myHandler [static, private] |
Definition at line 476 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::operator()().
string TableSAXReader< T, R, RFilter >::topLevelElement_s [private] |
Definition at line 474 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().
bool TableSAXReader< T, R, RFilter >::verbose [private] |
Definition at line 472 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().