#include <core/StringValue.hpp>
StringValue is a container for a std::string value, with methods for conversion to other containers derived from Value.
- See Also
- Value
Example : declaration
Example : getting the contained value
std::string Tmp1;
Tmp1 = Val1;
Example : setting the contained value
Val1.
set(
"Have a nice day");
openfluid::core::StringValue::StringValue |
( |
| ) |
|
|
inline |
openfluid::core::StringValue::StringValue |
( |
const StringValue & |
Val | ) |
|
|
inline |
openfluid::core::StringValue::StringValue |
( |
const std::string & |
POD | ) |
|
|
inline |
Constructor from plain old type
virtual openfluid::core::StringValue::~StringValue |
( |
| ) |
|
|
inlinevirtual |
Value* openfluid::core::StringValue::clone |
( |
| ) |
const |
|
inlinevirtual |
std::string& openfluid::core::StringValue::get |
( |
| ) |
|
|
inline |
Returns the string value as plain old type
- Returns
- the string value
const std::string& openfluid::core::StringValue::get |
( |
| ) |
const |
|
inline |
Returns the string value as a const plain old type
- Returns
- the string value
unsigned long openfluid::core::StringValue::getSize |
( |
| ) |
const |
|
inline |
Returns the size of the string
- Returns
- size of the string
Type openfluid::core::StringValue::getType |
( |
| ) |
const |
|
inlinevirtual |
openfluid::core::StringValue::operator std::string |
( |
| ) |
const |
|
inline |
Value& openfluid::core::StringValue::operator= |
( |
const Value & |
| ) |
|
|
virtual |
void openfluid::core::StringValue::set |
( |
const std::string & |
Val | ) |
|
|
inline |
Sets the string value
- Parameters
-
unsigned long openfluid::core::StringValue::size |
( |
| ) |
const |
|
inline |
Returns the size of the string
- Returns
- size of the string
bool openfluid::core::StringValue::toBoolean |
( |
bool & |
Val | ) |
const |
Converts the contained string to a boolean value (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toBooleanValue |
( |
BooleanValue & |
Val | ) |
const |
Converts the contained string to a BooleanValue (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toDouble |
( |
double & |
Val | ) |
const |
Converts the contained string to a double value (if possible)
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toDoubleValue |
( |
DoubleValue & |
Val | ) |
const |
Converts the contained string to a DoubleValue (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toInteger |
( |
long & |
Val | ) |
const |
Converts the contained string to a long value (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toIntegerValue |
( |
IntegerValue & |
Val | ) |
const |
Converts the contained string to an IntegerValue (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toMapValue |
( |
const std::string & |
Sep, |
|
|
MapValue & |
Val |
|
) |
| const |
Converts the contained string to a MapValue value (if possible)
- Parameters
-
[in] | Sep | the separator used to split the string into map items |
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toMatrixValue |
( |
const std::string & |
ColSep, |
|
|
const std::string & |
RowSep, |
|
|
MatrixValue & |
Val |
|
) |
| const |
Converts the contained string to a MatrixValue value (if possible)
- Parameters
-
[in] | ColSep | the column separator used to split the string columns |
[in] | RowSep | the row separator used to split the string rows |
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toMatrixValue |
( |
const std::string & |
Sep, |
|
|
const unsigned int & |
RowLength, |
|
|
MatrixValue & |
Val |
|
) |
| const |
Converts the contained string to a MatrixValue value (if possible)
- Parameters
-
[in] | Sep | the separator used to split the string |
[in] | RowLength | the size of a row |
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toNullValue |
( |
NullValue & |
Val | ) |
const |
Converts the contained string to a NullValue (if possible)
- Parameters
-
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
bool openfluid::core::StringValue::toVectorValue |
( |
const std::string & |
Sep, |
|
|
VectorValue & |
Val |
|
) |
| const |
Converts the contained string to a VectorValue value (if possible)
- Parameters
-
[in] | Sep | the separator used to split the string into vector items |
[out] | Val | the converted value |
- Returns
- bool true if the conversion is correct, false otherwise
void openfluid::core::StringValue::writeToStream |
( |
std::ostream & |
OutStm | ) |
const |
|
virtual |
The documentation for this class was generated from the following file: