#include <core/IntegerValue.hpp>
Public Member Functions | |
IntegerValue () | |
IntegerValue (const IntegerValue &Val) | |
IntegerValue (const long &POD) | |
Value & | operator= (const Value &Other) |
operator long () const | |
virtual | ~IntegerValue () |
Type | getType () const |
Value * | clone () const |
long & | get () |
const long & | get () const |
void | set (const long &Val) |
void | writeToStream (std::ostream &OutStm) const |
IntegerValue is a container for a signed long integer value.
Example : declaration
// declaration of an IntegerValue, initialized to 0 by default openfluid::core::IntegerValue Val1; // declaration of an IntegerValue, initialized to 35 openfluid::core::IntegerValue Val2(35);
Example : getting the contained value
long Tmp1; // using the get method Tmp1 = Val1.get(); // or using the cast operator Tmp1 = Val1;
Example : setting the contained value
// using the set method Val1.set(-10199);
Example : conversion from string
openfluid::core::StringValue StringVal("57"); // to IntegerValue Val1 = StringVal.toIntegerValue(); // to long long LongVal = StringVal.toInteger();
Example : conversion to string
std::string StdStrVal = Val1.toString();
openfluid::core::IntegerValue::IntegerValue | ( | ) | [inline] |
Default constructor
openfluid::core::IntegerValue::IntegerValue | ( | const IntegerValue & | Val | ) | [inline] |
Copy constructor
openfluid::core::IntegerValue::IntegerValue | ( | const long & | POD | ) | [inline] |
Constructor from plain old type
virtual openfluid::core::IntegerValue::~IntegerValue | ( | ) | [inline, virtual] |
Value* openfluid::core::IntegerValue::clone | ( | ) | const [inline, virtual] |
Reimplemented from openfluid::core::Value.
long& openfluid::core::IntegerValue::get | ( | ) | [inline] |
Returns the integer value as plain old type
const long& openfluid::core::IntegerValue::get | ( | ) | const [inline] |
Returns the integer value as a const plain old type
Type openfluid::core::IntegerValue::getType | ( | ) | const [inline, virtual] |
Implements openfluid::core::Value.
openfluid::core::IntegerValue::operator long | ( | ) | const [inline] |
Cast operator
Assignment operator
Reimplemented from openfluid::core::Value.
void openfluid::core::IntegerValue::set | ( | const long & | Val | ) | [inline] |
Sets the plain old type long integer value
[in] | Val | the long integer value |
void openfluid::core::IntegerValue::writeToStream | ( | std::ostream & | OutStm | ) | const [virtual] |
Implements openfluid::core::Value.