casa
5.7.0-16
|
#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. More... | |
~TableSAXReader () | |
The destructor. More... | |
void | operator() (const std::string &asdmDirectory, bool ignoreTime) |
It will be used as a functor. More... | |
Static Public Member Functions | |
static void | start_element_callback (void *v_p, const xmlChar *name, const xmlChar **) |
Defines the action to perform when an event "opening tag" occurs. More... | |
static void | end_element_callback (void *v_p, const xmlChar *name) |
Defines the action to perform when an event "closing tag" occurs. More... | |
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. More... | |
Private Types | |
typedef void(* | TableFiller )(const std::vector< R * > &, std::map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &) |
Static Private Member Functions | |
static xmlSAXHandler | initSAXHandler () |
static void | error (const std::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 |
std::string | topLevelElement_s |
asdm::ASDM | asdm |
Static Private Attributes | |
static xmlSAXHandler | myHandler |
Definition at line 248 of file asdm2MSGeneric.h.
|
private |
Definition at line 250 of file asdm2MSGeneric.h.
|
inline |
An empty contructor.
casacore::LogSinkInterface& lsif = casacore::LogSink::globalSink();
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(), casacore::LogSink::globalSink(), TableSAXReader< T, R, RFilter >::myContext, casa::name(), TableSAXReader< T, R, RFilter >::topLevelElement_s, and TableSAXReader< T, R, RFilter >::verbose.
|
inline |
The destructor.
Definition at line 281 of file asdm2MSGeneric.h.
|
inlinestatic |
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 461 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::initSAXHandler().
|
inlinestaticprivate |
Definition at line 500 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::unexpectedClosingElement().
Referenced by TableSAXReader< T, R, RFilter >::end_element_callback().
|
inlinestaticprivate |
Definition at line 496 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::unexpectedOpeningElement().
Referenced by TableSAXReader< T, R, RFilter >::start_element_callback().
|
inlinestatic |
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 360 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::checkClosingElement(), debug, TableSAXReader< T, R, RFilter >::error(), TableSAXReader< T, R, RFilter >::exitElementInfo(), getexepath(), casacore::LogMessage::NORMAL, casacore::LogSink::postGlobally(), V2CTX_P, and WHERE.
Referenced by TableSAXReader< T, R, RFilter >::initSAXHandler().
|
inlinestaticprivate |
Definition at line 504 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::start_element_callback().
|
inlinestaticprivate |
Definition at line 482 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().
|
inlinestaticprivate |
Definition at line 508 of file asdm2MSGeneric.h.
References V2CTX_P.
Referenced by TableSAXReader< T, R, RFilter >::end_element_callback().
|
inlinestaticprivate |
Definition at line 474 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().
|
inline |
It will be used as a functor.
Definition at line 286 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::myContext, TableSAXReader< T, R, RFilter >::myHandler, and casa::name().
|
inlinestatic |
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 296 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().
|
inlinestaticprivate |
Definition at line 491 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::error().
Referenced by TableSAXReader< T, R, RFilter >::checkClosingElement().
|
inlinestaticprivate |
Definition at line 486 of file asdm2MSGeneric.h.
References TableSAXReader< T, R, RFilter >::error().
Referenced by TableSAXReader< T, R, RFilter >::checkOpeningElement().
|
private |
Definition at line 472 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().
|
private |
Definition at line 470 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::operator()(), and TableSAXReader< T, R, RFilter >::TableSAXReader().
|
staticprivate |
Definition at line 473 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::operator()().
|
private |
Definition at line 471 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().
|
private |
Definition at line 469 of file asdm2MSGeneric.h.
Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().