casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casa::TBParser Class Referenceabstract

Parses the XMLDriver-generated XML into data in a TBTable. More...

#include <TBParser.h>

Inheritance diagram for casa::TBParser:
casa::TBHomeParser casa::TBXercesDOMParser casa::TBXercesSAXParser

Public Member Functions

 TBParser (TableParams *tp)
 Constructor which takes a TableParams argument to store references to the table parameters. More...
 
virtual ~TBParser ()
 
std::vector< std::vector
< casacore::String > * > * 
getData ()
 
void setPrintDebug (bool pdb)
 Set whether the TBParser should print debug information or not. More...
 
virtual Result parse (casacore::String *xml, bool parsedata=true)=0
 Any subclass must implement the parse() method. More...
 

Protected Attributes

bool & insertRow
 Is true if this table allows for the insertion of rows, false otherwise. More...
 
bool & removeRow
 Is true if this table allows for the deletion of rows, false otherwise. More...
 
std::vector< std::vector
< casacore::String > * > 
data
 Holds the table data. More...
 
std::vector< std::vector
< TBData * > * > & 
data2
 Holds the "real" table data. More...
 
std::vector< TBField * > & fields
 Holds the table fields. More...
 
std::vector< TBKeyword * > & keywords
 Holds the table keywords. More...
 
std::vector< int > & subtableRows
 Holds the list of the number of rows for each subtable. More...
 
int & totalRows
 Holds the total number of rows in the table. More...
 
int & loadedRows
 Holds the number of rows currently loaded in the table. More...
 
bool printdebug
 Is true if debug information should be printed, false otherwise. More...
 

Detailed Description

Parses the XMLDriver-generated XML into data in a TBTable.

Synopsis

TBParser is an abstract superclass for any implementing subclass to parse a casacore::String containing XML. A TBParser keeps a reference to the table parameters so that the table data can be directly imported. Note: the TBParser is not used for the "Direct" table driver, which is the default. Currently the user is unable to selected an "XML" table driver, which means TBParsers are not used.

Definition at line 67 of file TBParser.h.

Constructor & Destructor Documentation

casa::TBParser::TBParser ( TableParams tp)

Constructor which takes a TableParams argument to store references to the table parameters.

virtual casa::TBParser::~TBParser ( )
virtual

Member Function Documentation

std::vector<std::vector<casacore::String>*>* casa::TBParser::getData ( )
inline

Definition at line 76 of file TBParser.h.

References casa::data.

virtual Result casa::TBParser::parse ( casacore::String xml,
bool  parsedata = true 
)
pure virtual

Any subclass must implement the parse() method.

Parses the given String into the table parameters and returns a Result indicating whether the parsing succeeded or not. If parsedata is true, the table data is parsed, otherwise just table meta-data like keywords is parsed.

Implemented in casa::TBXercesSAXParser, casa::TBXercesDOMParser, and casa::TBHomeParser.

void casa::TBParser::setPrintDebug ( bool  pdb)

Set whether the TBParser should print debug information or not.

Member Data Documentation

std::vector<std::vector<casacore::String>*> casa::TBParser::data
protected

Holds the table data.

Definition at line 96 of file TBParser.h.

std::vector<std::vector<TBData*>*>& casa::TBParser::data2
protected

Holds the "real" table data.

Definition at line 99 of file TBParser.h.

std::vector<TBField*>& casa::TBParser::fields
protected

Holds the table fields.

Definition at line 102 of file TBParser.h.

bool& casa::TBParser::insertRow
protected

Is true if this table allows for the insertion of rows, false otherwise.

Definition at line 90 of file TBParser.h.

std::vector<TBKeyword*>& casa::TBParser::keywords
protected

Holds the table keywords.

Definition at line 105 of file TBParser.h.

int& casa::TBParser::loadedRows
protected

Holds the number of rows currently loaded in the table.

Definition at line 114 of file TBParser.h.

bool casa::TBParser::printdebug
protected

Is true if debug information should be printed, false otherwise.

Definition at line 117 of file TBParser.h.

bool& casa::TBParser::removeRow
protected

Is true if this table allows for the deletion of rows, false otherwise.

Definition at line 93 of file TBParser.h.

std::vector<int>& casa::TBParser::subtableRows
protected

Holds the list of the number of rows for each subtable.

Definition at line 108 of file TBParser.h.

int& casa::TBParser::totalRows
protected

Holds the total number of rows in the table.

Definition at line 111 of file TBParser.h.


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