Public Member Functions | List of all members
openfluid::core::IntegerValue Class Reference

#include <core/IntegerValue.hpp>

Inheritance diagram for openfluid::core::IntegerValue:
Inheritance graph
[legend]
Collaboration diagram for openfluid::core::IntegerValue:
Collaboration graph
[legend]

Public Member Functions

 IntegerValue ()
 
 IntegerValue (const IntegerValue &Val)
 
 IntegerValue (const long &POD)
 
virtual ~IntegerValue ()
 
Valueoperator= (const Value &Other)
 
 operator long () const
 
Type getType () const
 
Valueclone () const
 
bool convert (Value &Val) const
 
long get () const
 
void set (const long &Val)
 
void writeToStream (std::ostream &OutStm) const
 
void writeQuotedToStream (std::ostream &OutStm) const
 
- Public Member Functions inherited from openfluid::core::SimpleValue
 SimpleValue ()
 
bool isSimple () const
 
bool isCompound () const
 
- Public Member Functions inherited from openfluid::core::Value
 Value ()
 
virtual ~Value ()
 
bool isDoubleValue () const
 
const DoubleValueasDoubleValue () const
 
DoubleValueasDoubleValue ()
 
bool isIntegerValue () const
 
const IntegerValueasIntegerValue () const
 
IntegerValueasIntegerValue ()
 
bool isBooleanValue () const
 
const BooleanValueasBooleanValue () const
 
BooleanValueasBooleanValue ()
 
bool isStringValue () const
 
const StringValueasStringValue () const
 
StringValueasStringValue ()
 
bool isNullValue () const
 
const NullValueasNullValue () const
 
NullValueasNullValue ()
 
bool isVectorValue () const
 
const VectorValueasVectorValue () const
 
VectorValueasVectorValue ()
 
bool isMatrixValue () const
 
const MatrixValueasMatrixValue () const
 
MatrixValueasMatrixValue ()
 
bool isMapValue () const
 
const MapValueasMapValue () const
 
MapValueasMapValue ()
 
bool isTreeValue () const
 
const TreeValueasTreeValue () const
 
TreeValueasTreeValue ()
 
std::string toString () const
 

Additional Inherited Members

- Public Types inherited from openfluid::core::Value
enum  Type {
  NONE, BOOLEAN, INTEGER, DOUBLE,
  STRING, VECTOR, MATRIX, MAP,
  TREE, NULLL
}
 
- Static Public Member Functions inherited from openfluid::core::Value
static bool getValueTypeFromString (const std::string &ValueTypeString, Value::Type &ValueType)
 
static std::string getStringFromValueType (const Value::Type ValueType)
 

Detailed Description

IntegerValue is a container for a signed long integer value.

See also
Value


Example : declaration

// declaration of an IntegerValue, initialized to 0 by default
// declaration of an IntegerValue, initialized to 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

// to IntegerValue
Val1 = StringVal.toIntegerValue();
// to long
long LongVal = StringVal.toInteger();

Example : conversion to string

std::string StdStrVal = Val1.toString();

Constructor & Destructor Documentation

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 ( )
inlinevirtual

Member Function Documentation

Value* openfluid::core::IntegerValue::clone ( ) const
inlinevirtual

Reimplemented from openfluid::core::Value.

bool openfluid::core::IntegerValue::convert ( Value Val) const
virtual

Reimplemented from openfluid::core::Value.

long openfluid::core::IntegerValue::get ( ) const
inline

Returns the integer value as a plain old type

Returns
the integer value
Type openfluid::core::IntegerValue::getType ( ) const
inlinevirtual
openfluid::core::IntegerValue::operator long ( ) const
inline

Cast operator

Value& openfluid::core::IntegerValue::operator= ( const Value )
virtual

Assignment operator

Reimplemented from openfluid::core::Value.

void openfluid::core::IntegerValue::set ( const long &  Val)
inline

Sets the plain old type long integer value

Parameters
[in]Valthe long integer value
void openfluid::core::IntegerValue::writeQuotedToStream ( std::ostream &  OutStm) const
inlinevirtual
void openfluid::core::IntegerValue::writeToStream ( std::ostream &  OutStm) const
virtual

The documentation for this class was generated from the following file: