18 #ifndef NamedColumnsParser_h 19 #define NamedColumnsParser_h 73 const std::string& lineDelim =
";",
bool chomp =
false,
74 bool ignoreCase =
true);
92 void reinit(
const std::string& def,
const std::string& defDelim =
";",
93 const std::string& lineDelim =
";",
bool chomp =
false,
94 bool ignoreCase =
true);
122 std::string
get(
const std::string& name,
123 bool prune =
false)
const;
131 bool know(
const std::string& name)
const;
154 void reinitMap(std::string def,
const std::string& delim =
";",
166 void checkPrune(std::string& str,
bool prune)
const;
171 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.