Manual for OpenFLUID 2.1.11

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

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
StringVal.toIntegerValue(Val1);
// to long
long LongVal;
StringVal.toInteger(LongVal);

Example : conversion to string

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

#include <core/IntegerValue.hpp>

Public Member Functions

 IntegerValue ()
 
 IntegerValue (const IntegerValue &Val)
 
 IntegerValue (IntegerValue &&Val)
 
 IntegerValue (const long &POD)
 
IntegerValueoperator= (const Value &Other) override
 
IntegerValueoperator= (Value &&Other) override
 
IntegerValueoperator= (const IntegerValue &Other)=default
 
IntegerValueoperator= (IntegerValue &&Other)=default
 
virtual ~IntegerValue ()=default
 
 operator long () const
 
Type getType () const override
 
Valueclone () const override
 
bool convert (Value &Val) const override
 
long get () const
 
void set (const long &Val)
 
void writeToStream (std::ostream &OutStm) const override
 
void writeQuotedToStream (std::ostream &OutStm) const override
 
- Public Member Functions inherited from openfluid::core::SimpleValue
bool isSimple () const override
 
bool isCompound () const override
 
- Public Member Functions inherited from openfluid::core::Value
 Value ()=default
 
 Value (const Value &)=default
 
 Value (Value &&)=default
 
virtual ~Value ()=default
 
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)
 
Inheritance diagram for openfluid::core::IntegerValue:
Inheritance graph
[legend]
Collaboration diagram for openfluid::core::IntegerValue:
Collaboration graph
[legend]

Constructor & Destructor Documentation

◆ IntegerValue() [1/4]

openfluid::core::IntegerValue::IntegerValue ( )
inline

Default constructor

◆ IntegerValue() [2/4]

openfluid::core::IntegerValue::IntegerValue ( const IntegerValue Val)
inline

Copy constructor

◆ IntegerValue() [3/4]

openfluid::core::IntegerValue::IntegerValue ( IntegerValue &&  Val)
inline

Copy constructor

◆ IntegerValue() [4/4]

openfluid::core::IntegerValue::IntegerValue ( const long &  POD)
inline

Constructor from plain old type

◆ ~IntegerValue()

virtual openfluid::core::IntegerValue::~IntegerValue ( )
virtualdefault

Member Function Documentation

◆ clone()

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

Reimplemented from openfluid::core::Value.

◆ convert()

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

Reimplemented from openfluid::core::Value.

◆ get()

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

Returns the integer value as a plain old type

Returns
the integer value

◆ getType()

Type openfluid::core::IntegerValue::getType ( ) const
inlineoverridevirtual

◆ operator long()

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

Cast operator

◆ operator=() [1/4]

IntegerValue& openfluid::core::IntegerValue::operator= ( const IntegerValue Other)
default

◆ operator=() [2/4]

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

Assignment operator

Reimplemented from openfluid::core::Value.

◆ operator=() [3/4]

IntegerValue& openfluid::core::IntegerValue::operator= ( IntegerValue &&  Other)
default

◆ operator=() [4/4]

IntegerValue& openfluid::core::IntegerValue::operator= ( Value &&  )
overridevirtual

Move operator

Reimplemented from openfluid::core::Value.

◆ set()

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

Sets the plain old type long integer value

Parameters
[in]Valthe long integer value

◆ writeQuotedToStream()

void openfluid::core::IntegerValue::writeQuotedToStream ( std::ostream &  OutStm) const
inlineoverridevirtual

◆ writeToStream()

void openfluid::core::IntegerValue::writeToStream ( std::ostream &  OutStm) const
overridevirtual

The documentation for this class was generated from the following file:
openfluid::core::Value::toString
std::string toString() const
openfluid::core::IntegerValue::get
long get() const
Definition: IntegerValue.hpp:145
openfluid::core::IntegerValue::set
void set(const long &Val)
Definition: IntegerValue.hpp:154
openfluid::core::IntegerValue
Definition: IntegerValue.hpp:79
openfluid::core::StringValue
Definition: StringValue.hpp:76