TBParser subclass that uses a "home" parsing method. More...
#include <TBParser.h>
Public Member Functions | |
| TBHomeParser (TableParams *tp) | |
| Constructor that take the table parameters. | |
| virtual | ~TBHomeParser () |
| Result | parse (String *xml, bool parsedata=true) |
| Implements TBParser::parse(). | |
Private Member Functions | |
| XMLtoken * | parseToken (String *xml, int level) |
| Recursively parses a XMLtoken from the given String. | |
| void | parseAttributes (XMLtoken *token, String *attrPtr, int level) |
| Parses XML attributes from the given String into the given token. | |
| void | parseContent (XMLtoken *token, String *contentPtr, int level) |
| Parses XML content (<tag>content</tag>) from the given String into the given token. | |
| bool | parseXMLtable (XMLtoken *t, bool parsedata) |
| Given an XMLtoken tree, parse the table information from it. | |
Private Attributes | |
| std::vector< XMLtoken * > | xfields |
| All parsed XMLtokens that had a tag name of TBConstants::XML_FIELD. | |
| std::vector< XMLtoken * > | xkeywords |
| All parsed XMLtokens that had a tag name of TBConstants::XML_KEYWORD. | |
| std::map< String, std::vector < XMLtoken * > * > | xcolkeywords |
| All parsed XMLtokens that had a tag name of TBConstants::XML_COLUMNKW. | |
TBParser subclass that uses a "home" parsing method.
TBHomeParser is a subclass of TBParser that implements all the parsing methods itself using String methods. It is somewhat slow and its use is not recommended.
Definition at line 130 of file TBParser.h.
| casa::TBHomeParser::TBHomeParser | ( | TableParams * | tp | ) |
Constructor that take the table parameters.
| virtual casa::TBHomeParser::~TBHomeParser | ( | ) | [virtual] |
| Result casa::TBHomeParser::parse | ( | String * | xml, | |
| bool | parsedata = true | |||
| ) | [virtual] |
Implements TBParser::parse().
Parses the String into XMLtokens and then parses the table information from the XMLtokens.
Implements casa::TBParser.
| void casa::TBHomeParser::parseAttributes | ( | XMLtoken * | token, | |
| String * | attrPtr, | |||
| int | level | |||
| ) | [private] |
Parses XML attributes from the given String into the given token.
The level parameter is used to properly add tabs to the debug information.
| void casa::TBHomeParser::parseContent | ( | XMLtoken * | token, | |
| String * | contentPtr, | |||
| int | level | |||
| ) | [private] |
Parses XML content (<tag>content</tag>) from the given String into the given token.
The level parameter is used to properly add tabs to the debug information.
| XMLtoken* casa::TBHomeParser::parseToken | ( | 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.
std::map<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.
1.6.1