iopc::EStr< T > Class Template Reference
[iopcmeta]

Template class for the EString and EWString enhanced datatypes. More...

#include <enhancedString.h>

Inheritance diagram for iopc::EStr< T >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual const TypegetType () 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 TypegetInnerType () const
 Returns inner type for specified enhanced type.
virtual std::string toString () const
 Returns string representation of this object.
virtual Objectclone () 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 > >


Detailed Description

template<typename T>
class iopc::EStr< T >

Template class for the EString and EWString enhanced datatypes.

It provides operator overloads for string concatenation, comparison and assignment.


Member Function Documentation

template<typename T>
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.

Parameters:
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.

template<typename T>
void * iopc::EStr< T >::externalizeEmptyBuffer ( unsigned int  length  )  [inline, virtual]

Creates an empty buffer for obtaining the value.

Parameters:
length Allocated length of externalised copy. For numbers this value is ignored. For strings this value must by greater than 0.

Implements iopc::EnhancedTypeBase.

template<typename T>
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.

template<typename T>
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.

template<typename T>
int iopc::EStr< T >::compare ( const Object o  )  const [inline, virtual]

Compares two enhanced strings.

Performs a standard std::string compare

Returns:
-1 If the current string is lexicographically less than the specified string, 0 if the strings are equal and 1 if the current string is lexicographically greater.
Exceptions:
IopcIncorrectUsageException if comparing other than E(W)String types

Reimplemented from iopc::Object.


The documentation for this class was generated from the following file:

Generated on Tue Apr 14 16:46:36 2009 for IOPC 2 by  doxygen 1.5.6