|
jaula API Reference version 1.4.0
|
Class for handling numeric values. More...
#include <jaula_value_number.h>
Public Member Functions | |
| double | getData (void) const |
| Retrieves the value contained by the instance. More... | |
| virtual void | repr (std::ostream &ostr) const |
| Represents the instance in a stream. More... | |
| void | set (double data) |
| Establishes the contents of the instance. More... | |
| virtual void | set (Value const &origin) throw (Bad_Data_Type) |
| Copies the contents of one instance into another. More... | |
| Value_Number (double data=0) | |
| Constructor. More... | |
| virtual | ~Value_Number () |
| Destructor. More... | |
Public Member Functions inherited from JAULA::Value | |
| ValueType | getType (void) const |
| Retrieves the value type for the instance. More... | |
| Value & | operator= (Value const &orig) throw (Bad_Data_Type) |
| Assignment operator. More... | |
| virtual void | repr (std::ostream &ostr) const =0 |
| Represents the instance in a stream. More... | |
| virtual void | set (Value const &origin) throw (Bad_Data_Type) |
| Copies the contents of one instance into another. More... | |
| virtual | ~Value () |
| Destructor. More... | |
Private Attributes | |
| double | data_ |
| Container to hold the value itself. More... | |
Additional Inherited Members | |
Public Types inherited from JAULA::Value | |
| enum | ValueType { TYPE_NULL , TYPE_BOOLEAN , TYPE_STRING , TYPE_NUMBER , TYPE_NUMBER_INT , TYPE_ARRAY , TYPE_OBJECT } |
| Enumeration of available value types. More... | |
Static Public Member Functions inherited from JAULA::Value | |
| static Value * | duplicate (Value const &orig) |
| Creates a duplicate of a value. More... | |
Protected Member Functions inherited from JAULA::Value | |
| Value (ValueType Type) | |
| Constructor. More... | |
Class for handling numeric values.
| JAULA::Value_Number::Value_Number | ( | double | data = 0 | ) |
Constructor.
| data | Initial value to be hold by the conatiner |
|
virtual |
Destructor.
| double JAULA::Value_Number::getData | ( | void | ) | const |
Retrieves the value contained by the instance.
References data_.
Referenced by JAULA::Value::duplicate(), and set().
|
virtual |
Represents the instance in a stream.
| ostr | Stream where the instance is to be represented. |
Implements JAULA::Value.
References data_.
| void JAULA::Value_Number::set | ( | double | data | ) |
|
virtual | ||||||||||||||
Copies the contents of one instance into another.
| origin | Reference to the value to be copied. |
| Bad_Data_Type | This exception is launched in case that origin and destination value types are different. |
Reimplemented from JAULA::Value.
References JAULA::Exception::addOrigin(), getData(), and JAULA::Value::set().
|
private |
Copyright (c) 2007, 2008, 2009 Kombo Morongo.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
jaula project hosted by