ICG 2
Electric Boogaloo
Public Member Functions | List of all members
IntegerValue Class Reference

IntegerValue is a Value that represents an integer value on the right-hand-side of an equation. More...

#include <IntegerValue.hpp>

Inheritance diagram for IntegerValue:
NumericValue Value

Public Member Functions

 IntegerValue (long long value)
 
double getFloatingPointValue () const
 
long long getIntegerValue () const
 
void print (std::ostream &s) const
 
std::string toString () const
 
ValueType getValueType () const override
 
- Public Member Functions inherited from Value
virtual ~Value ()
 

Additional Inherited Members

- Public Types inherited from Value
enum  ValueType { STRING , INTEGER , FLOATING_POINT , POINTER }
 

Detailed Description

IntegerValue is a Value that represents an integer value on the right-hand-side of an equation.

Constructor & Destructor Documentation

◆ IntegerValue()

IntegerValue::IntegerValue ( long long  value)

Constructor.

Parameters
valueThe value of this IntegerValue.

Member Function Documentation

◆ getFloatingPointValue()

double IntegerValue::getFloatingPointValue ( ) const
virtual

Get the value of the IntegerValue as floating point.

Returns
the value as a double.

Implements NumericValue.

◆ getIntegerValue()

long long IntegerValue::getIntegerValue ( ) const
virtual

Get the value of this IntegerValue as an integer.

Returns
the value as a long long int.

Implements NumericValue.

◆ getValueType()

ValueType IntegerValue::getValueType ( ) const
inlineoverridevirtual

Implements Value.

◆ print()

void IntegerValue::print ( std::ostream &  s) const
virtual

Print this FloatingPointValue to a stream.

Implements Value.

◆ toString()

std::string IntegerValue::toString ( ) const
virtual

Get a string representation of this IntegerValue.

Implements Value.


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