5 #ifndef BPP_NUMERIC_NUMBER_H 6 #define BPP_NUMERIC_NUMBER_H 10 #include "../Clonable.h" 11 #include "../Text/TextTools.h" 31 virtual std::string
toString()
const = 0;
46 virtual std::string
toString()
const {
return "NaN"; }
67 Number(
const T& value = 0) : value_(value) {}
172 #endif // BPP_NUMERIC_NUMBER_H std::string toString() const
T getValue() const
Get the value of this number.
BppInteger(int value=0)
Build a new BppInteger number object with a specific value.
virtual std::string toString() const
An object wrapper for double values.
An object wrapper for integer values.
Number< T > & operator=(const T &t)
T value_
The value of this parameter.
virtual BppNotANumber * clone() const
Create a copy of this object and send a pointer to it.
BppDouble * clone() const
Create a copy of this object and send a pointer to it.
BppUnsignedInteger * clone() const
Create a copy of this object and send a pointer to it.
virtual BppNumberI * clone() const =0
Create a copy of this object and send a pointer to it.
BppUnsignedInteger(unsigned int value=0)
Build a new BppUnsignedInteger number object with a specific value.
The Clonable interface (allow an object to be cloned).
The Number object template class.
BppDouble(double value=0)
Build a new BppDouble number object with a specific value.
BppInteger * clone() const
Create a copy of this object and send a pointer to it.
virtual std::string toString() const =0
std::string toString(T t)
General template method to convert to a string.
Number< T > * clone() const
Create a copy of this object and send a pointer to it.
An object wrapper for unsigned integer values.
virtual ~BppUnsignedInteger()
Number(const T &value=0)
Build a new Number object with a specific value.