#include <vCore.h>
Public Member Functions | |
Number (T value) | |
Constructor. | |
Number (Base const &other) | |
Copy constructor. | |
virtual | ~Number () |
Base * | copy (void) const |
virtual Variant | GetValue (void) const |
Returns the value in its native format. | |
virtual int | GetInt (void) const |
Returns an integer using the current value. | |
virtual float | GetFloat (void) const |
Returns a float using the current value. | |
virtual tString | GetString (Base const *other=0) const |
Returns a String using the current value using Output(). | |
bool | operator== (Base const &other) const |
compares two values | |
bool | operator!= (Base const &other) const |
compares two values | |
bool | operator>= (Base const &other) const |
compares two values | |
bool | operator<= (Base const &other) const |
compares two values | |
bool | operator> (Base const &other) const |
compares two values | |
bool | operator< (Base const &other) const |
compares two values | |
Private Attributes | |
T | m_value |
The stored value. |
This should be used for types that can be converted to int and float and inserted into an istream
Definition at line 157 of file vCore.h.
vValue::Expr::Core::Number< T >::Number | ( | T | value | ) | [inline] |
Constructor.
Stores the given value inside the new class.
value | the value to be used |
Definition at line 184 of file vCore.h.
Referenced by vValue::Expr::Core::Number< T >::copy().
vValue::Expr::Core::Number< T >::Number | ( | Base const & | other | ) | [inline] |
virtual vValue::Expr::Core::Number< T >::~Number | ( | ) | [inline, virtual] |
Base * vValue::Expr::Core::Number< T >::copy | ( | void | ) | const [inline, virtual] |
Overwritten copy function
Reimplemented from vValue::Expr::Core::Base.
Definition at line 208 of file vCore.h.
References vValue::Expr::Core::Number< T >::Number().
00208 { 00209 return new Number(*this); 00210 }
Variant vValue::Expr::Core::Number< T >::GetValue | ( | void | ) | const [inline, virtual] |
Returns the value in its native format.
Returns the value stored inside the object
Reimplemented from vValue::Expr::Core::Base.
Definition at line 214 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00214 { 00215 return static_cast<T>(m_value); 00216 }
int vValue::Expr::Core::Number< T >::GetInt | ( | void | ) | const [inline, virtual] |
Returns an integer using the current value.
Returns the value stored inside the object
Reimplemented from vValue::Expr::Core::Base.
Definition at line 220 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00220 { 00221 return static_cast<int>(m_value); 00222 }
float vValue::Expr::Core::Number< T >::GetFloat | ( | void | ) | const [inline, virtual] |
Returns a float using the current value.
Returns the value stored inside the object, converted to a float
Reimplemented from vValue::Expr::Core::Base.
Definition at line 226 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00226 { 00227 return static_cast<float>(m_value); 00228 }
tString vValue::Expr::Core::Number< T >::GetString | ( | Base const * | other = 0 |
) | const [inline, virtual] |
Returns a String using the current value using Output().
Calls Output() to convert the stored value to a string
Reimplemented from vValue::Expr::Core::Base.
Definition at line 232 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value, and vValue::Expr::Core::Base::Output().
bool vValue::Expr::Core::Number< T >::operator== | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 236 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00236 { 00237 return m_value == static_cast<T>(other); 00238 }
bool vValue::Expr::Core::Number< T >::operator!= | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 239 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00239 { 00240 return m_value != static_cast<T>(other); 00241 }
bool vValue::Expr::Core::Number< T >::operator>= | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 242 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00242 { 00243 return m_value >= static_cast<T>(other); 00244 }
bool vValue::Expr::Core::Number< T >::operator<= | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 245 of file vCore.h.
bool vValue::Expr::Core::Number< T >::operator> | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 248 of file vCore.h.
References vValue::Expr::Core::Number< T >::m_value.
00248 { 00249 return m_value > static_cast<T>(other); 00250 }
bool vValue::Expr::Core::Number< T >::operator< | ( | Base const & | other | ) | const [inline, virtual] |
compares two values
Reimplemented from vValue::Expr::Core::Base.
Definition at line 251 of file vCore.h.
T vValue::Expr::Core::Number< T >::m_value [private] |
The stored value.
Definition at line 158 of file vCore.h.
Referenced by vValue::Expr::Core::Number< T >::GetFloat(), vValue::Expr::Core::Number< T >::GetInt(), vValue::Expr::Core::Number< T >::GetString(), vValue::Expr::Core::Number< T >::GetValue(), vValue::Expr::Core::Number< T >::operator!=(), vValue::Expr::Core::Number< T >::operator==(), vValue::Expr::Core::Number< T >::operator>(), and vValue::Expr::Core::Number< T >::operator>=().