20 #ifndef NamedColumnsParser_h 21 #define NamedColumnsParser_h 79 const std::string& lineDelim =
";",
bool chomp =
false,
80 bool ignoreCase =
true);
98 void reinit(
const std::string& def,
const std::string& defDelim =
";",
99 const std::string& lineDelim =
";",
bool chomp =
false,
100 bool ignoreCase =
true);
128 std::string
get(
const std::string& name,
129 bool prune =
false)
const;
137 bool know(
const std::string& name)
const;
160 void reinitMap(std::string def,
const std::string& delim =
";",
172 void checkPrune(std::string& str,
bool prune)
const;
177 typedef std::map<std::string, int>
PosMap;
PosMap myDefinitionsMap
The map of column item names to their positions within the table.
bool hasFullDefinition() const
Returns whether the number of named columns matches the actual number.
void reinit(const std::string &def, const std::string &defDelim=";", const std::string &lineDelim=";", bool chomp=false, bool ignoreCase=true)
Reinitialises the parser.
bool know(const std::string &name) const
Returns the information whether the named column is known.
NamedColumnsParser()
Constructor.
std::map< std::string, int > PosMap
The map's definition of column item names to their positions within the table.
~NamedColumnsParser()
Destructor.
StringTokenizer myLineParser
The contents of the current line.
A parser to retrieve information from a table with known columns.
void reinitMap(std::string def, const std::string &delim=";", bool chomp=false)
Rebuilds the map of attribute names to their positions in a table.
void checkPrune(std::string &str, bool prune) const
Prunes the given string if it shall be done.
bool myAmCaseInsensitive
Information whether case insensitive match shall be done.
void parseLine(const std::string &line)
Parses the contents of the line.
std::string myLineDelimiter
The delimiter to split the column items on.