casa
$Rev:20696$
|
Parses the XMLDriver-generated XML into data in a TBTable. More...
#include <TBParser.h>
Public Member Functions | |
TBParser (TableParams *tp) | |
Constructor which takes a TableParams argument to store references to the table parameters. | |
virtual | ~TBParser () |
vector< vector< String > * > * | getData () |
void | setPrintDebug (bool pdb) |
Set whether the TBParser should print debug information or not. | |
virtual Result | parse (String *xml, bool parsedata=true)=0 |
Any subclass must implement the parse() method. | |
Protected Attributes | |
bool & | insertRow |
Is true if this table allows for the insertion of rows, false otherwise. | |
bool & | removeRow |
Is true if this table allows for the deletion of rows, false otherwise. | |
vector< vector< String > * > | data |
Holds the table data. | |
vector< vector< TBData * > * > & | data2 |
Holds the "real" table data. | |
vector< TBField * > & | fields |
Holds the table fields. | |
vector< TBKeyword * > & | keywords |
Holds the table keywords. | |
vector< int > & | subtableRows |
Holds the list of the number of rows for each subtable. | |
int & | totalRows |
Holds the total number of rows in the table. | |
int & | loadedRows |
Holds the number of rows currently loaded in the table. | |
bool | printdebug |
Is true if debug information should be printed, false otherwise. |
Parses the XMLDriver-generated XML into data in a TBTable.
TBParser is an abstract superclass for any implementing subclass to parse a 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 68 of file TBParser.h.
casa::TBParser::TBParser | ( | TableParams * | tp | ) |
Constructor which takes a TableParams argument to store references to the table parameters.
virtual casa::TBParser::~TBParser | ( | ) | [virtual] |
vector<vector<String>*>* casa::TBParser::getData | ( | ) | [inline] |
Definition at line 77 of file TBParser.h.
References casa::data.
virtual Result casa::TBParser::parse | ( | 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.
vector<vector<String>*> casa::TBParser::data [protected] |
Holds the table data.
Definition at line 97 of file TBParser.h.
vector<vector<TBData*>*>& casa::TBParser::data2 [protected] |
Holds the "real" table data.
Definition at line 100 of file TBParser.h.
vector<TBField*>& casa::TBParser::fields [protected] |
Holds the table fields.
Definition at line 103 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 91 of file TBParser.h.
vector<TBKeyword*>& casa::TBParser::keywords [protected] |
Holds the table keywords.
Definition at line 106 of file TBParser.h.
int& casa::TBParser::loadedRows [protected] |
Holds the number of rows currently loaded in the table.
Definition at line 115 of file TBParser.h.
bool casa::TBParser::printdebug [protected] |
Is true if debug information should be printed, false otherwise.
Definition at line 118 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 94 of file TBParser.h.
vector<int>& casa::TBParser::subtableRows [protected] |
Holds the list of the number of rows for each subtable.
Definition at line 109 of file TBParser.h.
int& casa::TBParser::totalRows [protected] |
Holds the total number of rows in the table.
Definition at line 112 of file TBParser.h.