casa
5.7.0-16
|
TBParser subclass that uses a SAX parser in the XERCES library. More...
#include <TBParser.h>
Public Member Functions | |
TBXercesSAXParser (TableParams *tp) | |
Constructor that takes the table parameters. More... | |
virtual | ~TBXercesSAXParser () |
Result | parse (casacore::String *xml, bool parsedata=true) |
Implements TBParser::parse(). More... | |
void | startDocument () |
Implements DefaultHandler::startDocument(). More... | |
void | endDocument () |
Implements DefaultHandler::endDocument(). More... | |
void | startElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const Attributes &attrs) |
Implements DefaultHandler::startElement(). More... | |
void | endElement (const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) |
Implements DefaultHandler::endElement(). More... | |
void | characters (const XMLCh *const chars, const unsigned int length) |
Implements DefaultHandler::characters(). More... | |
Public Member Functions inherited from casa::TBParser | |
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... | |
Private Attributes | |
SAX2XMLReader * | reader |
SAX reader. More... | |
bool | inTD |
Flag indicating whether the parsing is currently in a tag or not. More... | |
std::vector< casacore::String > * | row |
The current row of table data being parsed. More... | |
std::stringstream | extraText |
Keeps all non-XML or extra text. More... | |
bool | valid |
Indicates whether the parsing is valid or not. More... | |
std::map< int, std::vector < TBKeyword * > * > | colkws |
Keep all parsed column keywords. More... | |
bool | parsedata |
Is true if the table data should be parsed, false otherwise. More... | |
Additional Inherited Members | |
Protected Attributes inherited from casa::TBParser | |
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... | |
TBParser subclass that uses a SAX parser in the XERCES library.
TBXercesSAXParser is a subclass of TBParser that implements all the parsing methods using a XERCES SAX parser. If XML parsing is required, the TBXercesSAXParser is recommended for its (relative) speed. TBXercesSAXParser also implements xerces::DefaultHandler since SAX uses event-driven parsing.
Definition at line 221 of file TBParser.h.
casa::TBXercesSAXParser::TBXercesSAXParser | ( | TableParams * | tp | ) |
Constructor that takes the table parameters.
|
virtual |
void casa::TBXercesSAXParser::characters | ( | const XMLCh *const | chars, |
const unsigned int | length | ||
) |
Implements DefaultHandler::characters().
void casa::TBXercesSAXParser::endDocument | ( | ) |
Implements DefaultHandler::endDocument().
void casa::TBXercesSAXParser::endElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname | ||
) |
Implements DefaultHandler::endElement().
|
virtual |
Implements TBParser::parse().
Parses the casacore::String into the table data serially using event-driven SAX parsing.
Implements casa::TBParser.
void casa::TBXercesSAXParser::startDocument | ( | ) |
Implements DefaultHandler::startDocument().
void casa::TBXercesSAXParser::startElement | ( | const XMLCh *const | uri, |
const XMLCh *const | localname, | ||
const XMLCh *const | qname, | ||
const Attributes & | attrs | ||
) |
Implements DefaultHandler::startElement().
|
private |
Keep all parsed column keywords.
Definition at line 267 of file TBParser.h.
|
private |
Keeps all non-XML or extra text.
Definition at line 261 of file TBParser.h.
|
private |
Flag indicating whether the parsing is currently in a tag or not.
Definition at line 255 of file TBParser.h.
|
private |
Is true if the table data should be parsed, false otherwise.
Definition at line 270 of file TBParser.h.
|
private |
SAX reader.
Definition at line 252 of file TBParser.h.
|
private |
The current row of table data being parsed.
Definition at line 258 of file TBParser.h.
|
private |
Indicates whether the parsing is valid or not.
Definition at line 264 of file TBParser.h.