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

#include <FloatingPointValue.hpp>

Inheritance diagram for FloatingPointValue:
NumericValue Value

Public Member Functions

 FloatingPointValue (double value)
 
double getFloatingPointValue () const override
 
long long getIntegerValue () const override
 
void print (std::ostream &s) const override
 
std::string toString () const override
 
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 }
 

Constructor & Destructor Documentation

◆ FloatingPointValue()

FloatingPointValue::FloatingPointValue ( double  value)

Constructor.

Parameters
valueThe value of this FloatingPointValue.

Member Function Documentation

◆ getFloatingPointValue()

double FloatingPointValue::getFloatingPointValue ( ) const
overridevirtual

Get the value of this FloatingPointValue as floating point.

Returns
the value as a double.

Implements NumericValue.

◆ getIntegerValue()

long long FloatingPointValue::getIntegerValue ( ) const
overridevirtual

Get the value of this FloatingPointValue as an integer.

Returns
the value as a long long int.

Implements NumericValue.

◆ getValueType()

ValueType FloatingPointValue::getValueType ( ) const
inlineoverridevirtual

Implements Value.

◆ print()

void FloatingPointValue::print ( std::ostream &  s) const
overridevirtual

Print this FloatingPointValue to a stream.

Implements Value.

◆ toString()

std::string FloatingPointValue::toString ( ) const
overridevirtual

Get a string representation of this FloatingPointValue.

Implements Value.


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