Public Member Functions

openfluid::core::IntegerValue Class Reference

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

List of all members.

Public Member Functions

 IntegerValue ()
 IntegerValue (const IntegerValue &Val)
 IntegerValue (const long &POD)
Valueoperator= (const Value &Other)
 operator long () const
virtual ~IntegerValue ()
Type getType () const
Valueclone () const
long & get ()
const long & get () const
void set (const long &Val)
void writeToStream (std::ostream &OutStm) const

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

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 ( ) [inline, virtual]

Member Function Documentation

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

Returns:
the integer value
const long& openfluid::core::IntegerValue::get ( ) const [inline]

Returns the integer value as a const plain old type

Returns:
the integer value
Type openfluid::core::IntegerValue::getType ( ) const [inline, virtual]
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::writeToStream ( std::ostream &  OutStm) const [virtual]

Generated using Doxygen 1.7.3
Creative Commons License Creative Commons By-NC-ND license