casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | Static Private Attributes
TableSAXReader< T, R, RFilter > Class Template Reference

#include <asdm2MSGeneric.h>

List of all members.

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

Detailed Description

template<class T, class R, class RFilter>
class TableSAXReader< T, R, RFilter >

Definition at line 248 of file asdm2MSGeneric.h.


Member Typedef Documentation

template<class T , class R , class RFilter >
typedef void(* TableSAXReader< T, R, RFilter >::TableFiller)(const vector< R * > &, map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &) [private]

Definition at line 250 of file asdm2MSGeneric.h.


Constructor & Destructor Documentation

template<class T , class R , class RFilter >
TableSAXReader< T, R, RFilter >::TableSAXReader ( bool  verbose,
RFilter &  rFilter,
TableFiller  tableFiller_f_p,
std::map< AtmPhaseCorrectionMod::AtmPhaseCorrection, ASDM2MSFiller * > &  msFillers_m 
) [inline]
template<class T , class R , class RFilter >
TableSAXReader< T, R, RFilter >::~TableSAXReader ( ) [inline]

The destructor.

Definition at line 280 of file asdm2MSGeneric.h.


Member Function Documentation

template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
static void TableSAXReader< T, R, RFilter >::checkClosingElement ( const xmlChar name,
const xmlChar expectedName 
) [inline, static, private]
template<class T , class R , class RFilter >
static void TableSAXReader< T, R, RFilter >::checkOpeningElement ( const xmlChar name,
const xmlChar expectedName 
) [inline, static, private]
template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
static void TableSAXReader< T, R, RFilter >::error ( const string &  message) [inline, static, private]
template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
static xmlSAXHandler TableSAXReader< T, R, RFilter >::initSAXHandler ( ) [inline, static, private]
template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
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().

template<class T , class R , class RFilter >
static void TableSAXReader< T, R, RFilter >::unexpectedClosingElement ( const xmlChar name) [inline, static, private]
template<class T , class R , class RFilter >
static void TableSAXReader< T, R, RFilter >::unexpectedOpeningElement ( const xmlChar name,
const xmlChar expectedName 
) [inline, static, private]

Member Data Documentation

template<class T , class R , class RFilter >
asdm::ASDM TableSAXReader< T, R, RFilter >::asdm [private]

Definition at line 475 of file asdm2MSGeneric.h.

Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().

template<class T , class R , class RFilter >
ParserContext<T, R, RFilter> TableSAXReader< T, R, RFilter >::myContext [private]
template<class T , class R , class RFilter >
xmlSAXHandler TableSAXReader< T, R, RFilter >::myHandler [static, private]

Definition at line 476 of file asdm2MSGeneric.h.

Referenced by TableSAXReader< T, R, RFilter >::operator()().

template<class T , class R , class RFilter >
string TableSAXReader< T, R, RFilter >::topLevelElement_s [private]

Definition at line 474 of file asdm2MSGeneric.h.

Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().

template<class T , class R , class RFilter >
bool TableSAXReader< T, R, RFilter >::verbose [private]

Definition at line 472 of file asdm2MSGeneric.h.

Referenced by TableSAXReader< T, R, RFilter >::TableSAXReader().


The documentation for this class was generated from the following file: