#include <enhancedString.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) |
Creates a copy of this object's value and returns a pointer to it. | |
virtual void * | externalizeEmptyBuffer (unsigned int length) |
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 strings. | |
template<> | |
std::string | toString () const |
Returns string representation of this object. | |
template<> | |
std::string | toString () const |
Returns string representation of this object. | |
Friends | |
class | iopc::TypeDesc< EStr< T > > |
It provides operator overloads for string concatenation, comparison and assignment.
void * iopc::EStr< T >::externalizeCopy | ( | unsigned int | maxlength | ) | [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::EStr< T >::externalizeEmptyBuffer | ( | unsigned int | length | ) | [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::EStr< 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::EStr< 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::EStr< T >::compare | ( | const Object & | o | ) | const [inline, virtual] |
Compares two enhanced strings.
Performs a standard std::string compare
IopcIncorrectUsageException | if comparing other than E(W)String types |
Reimplemented from iopc::Object.