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

TBParser subclass that uses a "home" parsing method. More...

#include <TBParser.h>

Inheritance diagram for casa::TBHomeParser:
casa::TBParser

Public Member Functions

 TBHomeParser (TableParams *tp)
 Constructor that take the table parameters. More...
 
virtual ~TBHomeParser ()
 
Result parse (casacore::String *xml, bool parsedata=true)
 Implements TBParser::parse(). 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 Member Functions

XMLtokenparseToken (casacore::String *xml, int level)
 Recursively parses a XMLtoken from the given String. More...
 
void parseAttributes (XMLtoken *token, casacore::String *attrPtr, int level)
 Parses XML attributes from the given casacore::String into the given token. More...
 
void parseContent (XMLtoken *token, casacore::String *contentPtr, int level)
 Parses XML content (<tag>content</tag>) from the given casacore::String into the given token. More...
 
bool parseXMLtable (XMLtoken *t, bool parsedata)
 Given an XMLtoken tree, parse the table information from it. More...
 

Private Attributes

std::vector< XMLtoken * > xfields
 All parsed XMLtokens that had a tag name of TBConstants::XML_FIELD. More...
 
std::vector< XMLtoken * > xkeywords
 All parsed XMLtokens that had a tag name of TBConstants::XML_KEYWORD. More...
 
std::map< casacore::String,
std::vector< XMLtoken * > * > 
xcolkeywords
 All parsed XMLtokens that had a tag name of TBConstants::XML_COLUMNKW. 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...
 

Detailed Description

TBParser subclass that uses a "home" parsing method.

Synopsis

TBHomeParser is a subclass of TBParser that implements all the parsing methods itself using casacore::String methods. It is somewhat slow and its use is not recommended.

Definition at line 130 of file TBParser.h.

Constructor & Destructor Documentation

casa::TBHomeParser::TBHomeParser ( TableParams tp)

Constructor that take the table parameters.

virtual casa::TBHomeParser::~TBHomeParser ( )
virtual

Member Function Documentation

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

Implements TBParser::parse().

Parses the casacore::String into XMLtokens and then parses the table information from the XMLtokens.

Implements casa::TBParser.

void casa::TBHomeParser::parseAttributes ( XMLtoken token,
casacore::String attrPtr,
int  level 
)
private

Parses XML attributes from the given casacore::String into the given token.

The level parameter is used to properly add tabs to the debug information.

void casa::TBHomeParser::parseContent ( XMLtoken token,
casacore::String contentPtr,
int  level 
)
private

Parses XML content (<tag>content</tag>) from the given casacore::String into the given token.

The level parameter is used to properly add tabs to the debug information.

XMLtoken* casa::TBHomeParser::parseToken ( casacore::String xml,
int  level 
)
private

Recursively parses a XMLtoken from the given String.

The level parameter is used to properly add tabs to the debug information.

bool casa::TBHomeParser::parseXMLtable ( XMLtoken t,
bool  parsedata 
)
private

Given an XMLtoken tree, parse the table information from it.

If parsedata is true the table data is parsed, otherwise just the meta-information like keywords is parsed.

Member Data Documentation

std::map<casacore::String, std::vector<XMLtoken*>*> casa::TBHomeParser::xcolkeywords
private

All parsed XMLtokens that had a tag name of TBConstants::XML_COLUMNKW.

Definition at line 150 of file TBParser.h.

std::vector<XMLtoken*> casa::TBHomeParser::xfields
private

All parsed XMLtokens that had a tag name of TBConstants::XML_FIELD.

Definition at line 144 of file TBParser.h.

std::vector<XMLtoken*> casa::TBHomeParser::xkeywords
private

All parsed XMLtokens that had a tag name of TBConstants::XML_KEYWORD.

Definition at line 147 of file TBParser.h.


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