#include <BasicListParser.h>
Inheritance diagram for BasicListParser:
Public Methods | |
BasicListParser () | |
Constructor. More... | |
virtual | ~BasicListParser () |
Destructor. More... | |
virtual bool | parse (AIDA_STD::string a_string)=0 |
bool | isValid () |
This method returns true if parsing of pairs has been successful. More... | |
virtual void | clear () |
Method to clear up the list parser. Clears names and values vectors. More... | |
size_t | count () |
Number of pairs processed when parse succeeded. More... | |
void | startTerm () |
Move to first pair element. More... | |
void | forthTerm () |
Move to next pair element. More... | |
bool | hasTerm () |
True if current "list" of pairs has valid item. More... | |
const AIDA_STD::string | getName () |
Name of current pair element. More... | |
const AIDA_STD::string | getValue () |
Value of current pair element or name of the element to compare with. More... | |
Protected Types | |
typedef AIDA_STD::vector< AIDA_STD::string > | StringVector |
Protected Attributes | |
StringVector | pair_names_os |
StringVector | pair_values_os |
size_t | pair_count |
size_t | iter_index |
bool | parsing_successful |
Definition at line 29 of file BasicListParser.h.
|
Definition at line 75 of file BasicListParser.h. |
|
Definition at line 32 of file BasicListParser.h. References iter_index, pair_count, and parsing_successful. |
|
Definition at line 34 of file BasicListParser.h. References clear. |
|
Definition at line 43 of file BasicListParser.h. References iter_index, pair_count, pair_names_os, pair_values_os, and parsing_successful. Referenced by ConstList::parse, ~BasicListParser, and ConstList::~ConstList. |
|
Definition at line 51 of file BasicListParser.h. References pair_count. Referenced by hasTerm. |
|
Definition at line 67 of file BasicListParser.h. References iter_index. |
|
Definition at line 71 of file BasicListParser.h. References iter_index, and pair_names_os. |
|
Definition at line 73 of file BasicListParser.h. References iter_index, and pair_values_os. |
|
Definition at line 69 of file BasicListParser.h. References count, and iter_index. |
|
Definition at line 41 of file BasicListParser.h. References parsing_successful. |
|
This method returns true if parsing of `a_string' has been successful. The method is pure virtual, thus must be implemented in subclasses. Updates pairs names and values to be looped over. Implemented in ConstList. |
|
Looping over terms: startTerm(); while( hasTerm() ) { ... getName(); ... getValue(); forthTerm(); } Definition at line 65 of file BasicListParser.h. References iter_index. |
|
Definition at line 79 of file BasicListParser.h. Referenced by BasicListParser, clear, forthTerm, getName, getValue, hasTerm, and startTerm. |
|
Definition at line 78 of file BasicListParser.h. Referenced by BasicListParser, clear, count, and ConstList::parse. |
|
Definition at line 76 of file BasicListParser.h. Referenced by clear, getName, and ConstList::parseTerm. |
|
Definition at line 77 of file BasicListParser.h. Referenced by clear, getValue, and ConstList::parseTerm. |
|
Definition at line 80 of file BasicListParser.h. Referenced by BasicListParser, clear, isValid, and ConstList::parse. |