#include <enhancedNumber.h>
Public Member Functions | |
virtual const Type & | getType () const |
Returns a Type Description representing the type of the current object. | |
virtual void * | externalizeCopy (unsigned int maxlength=0) |
Creates a copy of this object's value and returns a pointer to it. | |
virtual void * | externalizeEmptyBuffer (unsigned int length=0) |
Creates an empty buffer for obtaining the value. | |
virtual void | updateFromExternalized () |
Updates this object's value from the externalized buffer. | |
virtual unsigned int | getBufferSize () |
Returns externalized buffer size in bytes. | |
virtual const Type & | getInnerType () const |
Returns inner type for specified enhanced type. | |
virtual std::string | toString () const |
Returns string representation of this object. | |
virtual Object * | clone () const |
Returns a copy of this object. | |
virtual int | compare (const Object &o) const |
Compares two enhanced numbers. |
It provides operator overloads basic mathematical operations, assignments and casts to standard C++ numeric data types.
void * iopc::ENumber< T >::externalizeCopy | ( | unsigned int | maxlength = 0 |
) | [inline, virtual] |
Creates a copy of this object's value and returns a pointer to it.
Type of the copy is the type of the wrapped value (numbers) or char/wchar_t* for EString or EWString.
maxlength | Maximum allocated length of externalised copy. For numbers this value is ignored. For strings this value must by greater than 0. |
Implements iopc::EnhancedTypeBase.
void * iopc::ENumber< T >::externalizeEmptyBuffer | ( | unsigned int | length = 0 |
) | [inline, virtual] |
Creates an empty buffer for obtaining the value.
length | Allocated length of externalised copy. For numbers this value is ignored. For strings this value must by greater than 0. |
Implements iopc::EnhancedTypeBase.
const Type & iopc::ENumber< T >::getInnerType | ( | ) | const [inline, virtual] |
Returns inner type for specified enhanced type.
Inner type represents a type that is wrapped by the enhanced data type. It should be one of the basic C++ types or STL strings.
Implements iopc::EnhancedTypeBase.
Object * iopc::ENumber< T >::clone | ( | ) | const [inline, virtual] |
Returns a copy of this object.
Object descendants may implement this method in various ways. Default implementation returns only an empty Object instance.
Reimplemented from iopc::Object.
int iopc::ENumber< T >::compare | ( | const Object & | o | ) | const [inline, virtual] |
Compares two enhanced numbers.
Performs a standard numeric compare
IopcIncorrectUsageException | if comparing other than E(W)String types |
Reimplemented from iopc::Object.