38 #ifdef CHECK_MEMORY_LEAKS
40 #endif // CHECK_MEMORY_LEAKS
50 const std::string& defDelim,
51 const std::string& lineDelim,
52 bool prune,
bool ignoreCase)
53 : myLineDelimiter(lineDelim), myAmCaseInsensitive(ignoreCase) {
63 const std::string& defDelim,
64 const std::string& lineDelim,
65 bool prune,
bool ignoreCase) {
80 PosMap::const_iterator i = myDefinitionsMap.find(name);
81 if (i == myDefinitionsMap.end()) {
82 if (myAmCaseInsensitive) {
85 if (i == myDefinitionsMap.end()) {
89 size_t pos = (*i).second;
90 if (myLineParser.size() <= pos) {
93 std::string ret = myLineParser.get(pos);
94 checkPrune(ret, prune);
110 size_t pos = (*i).second;
123 const std::string& delim,
132 std::string next = st.
next();
134 myDefinitionsMap.insert(std::map<std::string, int>::value_type(next, pos++));
144 size_t idx = str.find_first_not_of(
" ");
145 if (idx != std::string::npos) {
146 str = str.substr(idx);
148 idx = str.find_last_not_of(
" ");
149 if (idx != std::string::npos && idx != str.length() - 1) {
150 str = str.substr(0, idx + 1);