Implementation of a string wrapper.The InputString class is a wrapper class for the purpose to read input strings delimited by quotations from streams, like for instance "example input". All characters between the leading and the trailing quotation are extracted unchanged from the input stream, including whitespaces. The input string has to be in one single line. In case of input errors, the std::istream::failbit of the input stream is set.
More...
#include <InputString.h>
|
|
std::string | buffer_ |
| The character buffer.
|
|
Implementation of a string wrapper.
The InputString class is a wrapper class for the purpose to read input strings delimited by quotations from streams, like for instance "example input". All characters between the leading and the trailing quotation are extracted unchanged from the input stream, including whitespaces. The input string has to be in one single line. In case of input errors, the std::istream::failbit of the input stream is set.
blaze::InputString::InputString |
( |
const char * |
string = "" | ) |
|
|
inlineexplicit |
The default constructor for InputString.
- Parameters
-
string | The initial value for the string. |
blaze::InputString::InputString |
( |
const std::string & |
string | ) |
|
|
inlineexplicit |
Constructor for the direct initialization with a std::string.
- Parameters
-
string | The initial value for the string. |
blaze::InputString::InputString |
( |
const InputString & |
s | ) |
|
|
inline |
The copy constructor for InputString.
- Parameters
-
s | The string object to be copied. |
const char * blaze::InputString::c_str |
( |
| ) |
const |
|
inline |
Conversion to a constant character array.
- Returns
- The converted constant character array.
Returns the maximum capacity of the string.
- Returns
- The capacity of the string.
bool blaze::InputString::empty |
( |
| ) |
const |
|
inline |
Returns if the string is empty.
- Returns
- true if the string is empty, false if it is not.
InputString & blaze::InputString::operator= |
( |
const char * |
string | ) |
|
|
inline |
Assignment operator for C-style character strings.
- Parameters
-
string | The C-style string to be copied. |
- Returns
- Reference to the assigned string.
InputString & blaze::InputString::operator= |
( |
const std::string & |
string | ) |
|
|
inline |
Assignment operator for STL strings.
- Parameters
-
string | The STL string to be copied. |
- Returns
- Reference to the assigned string.
char & blaze::InputString::operator[] |
( |
SizeType |
index | ) |
|
|
inline |
Direct access to the characters of the string.
- Parameters
-
index | Access index. The index has to be in the range . |
- Returns
- A reference to the indexed character.
const char & blaze::InputString::operator[] |
( |
SizeType |
index | ) |
const |
|
inline |
Direct access to the characters of the string.
- Parameters
-
index | Access index. The index has to be in the range . |
- Returns
- A reference to the indexed character.
void blaze::InputString::reserve |
( |
SizeType |
newSize | ) |
|
|
inline |
Reserves at least size characters within the string.
- Parameters
-
newSize | The minimum size of the string. |
- Returns
- void
Returns the size of the string.
- Returns
- The size of the string.
const std::string & blaze::InputString::str |
( |
| ) |
const |
|
inline |
Conversion to a std::string.
- Returns
- The converted std::string.
The documentation for this class was generated from the following file: