83 #ifndef __SubString_H__ 84 #define __SubString_H__ 124 bool bAllowEmptyEntries=
false,
125 char escapeChar =
'\\',
126 bool bRemoveEscapeChar =
true,
127 char safemodeChar =
'"',
128 bool bRemoveSafemodeChar =
true,
129 char openparenthesisChar =
'{',
130 char closeparenthesisChar =
'}',
131 bool bRemoveParenthesisChars =
true,
132 char commentChar =
'\0');
133 SubString(
size_t argc,
const char** argv);
142 bool compare(
const SubString& other,
size_t length = std::string::npos)
const;
153 bool bAllowEmptyEntries =
false,
154 char escapeChar =
'\\',
155 bool bRemoveEscapeChar =
true,
156 char safemodeChar =
'"',
157 bool bRemoveSafemodeChar =
true,
158 char openparenthesisChar =
'{',
159 char closeparenthesisChar =
'}',
160 bool bRemoveParenthesisChars =
true,
161 char commentChar =
'\0');
167 SubString subSet(
size_t begin,
size_t length = std::string::npos)
const;
171 inline bool empty()
const {
return this->tokens_.empty(); }
173 inline size_t size()
const {
return this->tokens_.size(); }
179 inline const std::vector<std::string>&
getAllStrings()
const {
return this->tokens_; }
181 inline bool isInSafemode(
size_t index)
const {
return this->bTokenInSafemode_[index]; }
187 inline void pop_back() { this->tokens_.pop_back(); this->bTokenInSafemode_.pop_back(); }
199 std::vector<bool>& bTokenInSafemode,
203 bool bAllowEmptyEntries =
false,
204 char escapeChar =
'\\',
205 bool bRemoveEscapeChar =
true,
206 char safemodeChar =
'"',
207 bool bRemoveSafemodeChar =
true,
208 char openparenthesisChar =
'{',
209 char closeparenthesisChar =
'}',
210 bool bRemoveParenthesisChars =
true,
211 char commentChar =
'\0',
#define _UtilExport
Definition: UtilPrereqs.h:60
bool empty() const
Returns true if the SubString is empty.
Definition: SubString.h:171
void pop_back()
Removes the back of the list of tokens.
Definition: SubString.h:187
bool isInSafemode(size_t index) const
Returns true if the token is in safemode.
Definition: SubString.h:181
const std::string & front() const
Returns the front of the list of tokens.
Definition: SubString.h:183
void debug(const std::string &text)
Prints debug output with verbose level.
Definition: ConsoleCommandCompilation.cc:161
SPLIT_LINE_STATE
An enumerator for the internal state of the parser.
Definition: SubString.h:104
::std::string string
Definition: gtest-port.h:756
TiXmlString operator+(const TiXmlString &a, const TiXmlString &b)
Definition: tinystr.cpp:86
size_t size() const
Returns the number of tokens stored in this SubString.
Definition: SubString.h:173
SubString & append(const SubString &other)
Appends the tokens of another SubString to this.
Definition: SubString.h:146
static const SubString NullSubString
An empty SubString.
Definition: SubString.h:194
const std::string & getString(size_t index) const
Returns the i'th token from the subset of strings.
Definition: SubString.h:177
const std::vector< std::string > & getAllStrings() const
Returns all tokens as std::vector.
Definition: SubString.h:179
const std::string & operator[](size_t index) const
Returns the i'th token from the subset of strings.
Definition: SubString.h:175
static const std::string WhiteSpacesWithComma
All whitespaces and the comma (usually used as delimiters)
Definition: SubString.h:193
A class that splits a string into multiple tokens using different options.
Definition: SubString.h:101
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
std::vector< bool > bTokenInSafemode_
Saves for each token if it was in safe mode (between quotation marks or parenthesis) ...
Definition: SubString.h:215
Shared library macros, enums, constants and forward declarations for the util library ...
static const std::string WhiteSpaces
All whitespaces (usually used as delimiters or delimiterNeighbours.
Definition: SubString.h:192
const std::string & back() const
Returns the back of the list of tokens.
Definition: SubString.h:185
constexpr bool operator==(bool x, tribool y)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: tribool.h:117
std::vector< std::string > tokens_
The tokens after splitting the input line.
Definition: SubString.h:214