iopc::EnhancedTypeBase Class Reference
[iopcmeta]

Base class of all enhanced data types. More...

#include <enhancedTypeBase.h>

Inheritance diagram for iopc::EnhancedTypeBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

void setDirtyPtr (bool *newDirtyPtr)
 Sets a pointer to a boolean value which is updated to true whenever status of this object becomes 'dirty'.
virtual void setDirty (bool dirty=true)
 Sets the dirty flag to a specified value.
virtual void resetDirty ()
 Resets the dirty flag of this object.
virtual void setNull (bool null=true)
 Sets the NULL status of this object.
virtual bool isNull () const
 Determines whether this objects represents a NULL value or not.
virtual void resetNull ()
 Resets the NULL status of this object to not NULL.
virtual void * externalizeCopy (unsigned int maxlength=0)=0
 Creates a copy of this object's value and returns a pointer to it.
virtual void * externalizeEmptyBuffer (unsigned int length=0)=0
 Creates an empty buffer for obtaining the value.
virtual void updateFromExternalized ()=0
 Updates this object's value from the externalized buffer.
virtual unsigned int getBufferSize ()=0
 Returns externalized buffer size in bytes.
virtual const TypegetInnerType () const =0
 Returns inner type for specified enhanced type.

Static Public Member Functions

static void init ()
 Initializes all enhanced data types.
static const TypegetInnerTypeFor (const Type &enhancedType)
 Returns inner type for specified enhanced type.


Detailed Description

Base class of all enhanced data types.

Enhanced data types are classes that mimic behaviour of selected built-in or STL data types. They provide dirty status tracking and the NULL value support.

If used as attribute types in reflection-capable classes, they cooperate with the Object class to provide dirty status tracking at a object level.


Member Function Documentation

void iopc::EnhancedTypeBase::setDirtyPtr ( bool *  newDirtyPtr  ) 

Sets a pointer to a boolean value which is updated to true whenever status of this object becomes 'dirty'.

Used by Object to allow the enhanced datatype attributes to set dirty status of the whole object.

virtual void iopc::EnhancedTypeBase::setNull ( bool  null = true  )  [inline, virtual]

Sets the NULL status of this object.

Parameters:
null true - this object is NULL, false - this object is not NULL

virtual void* iopc::EnhancedTypeBase::externalizeCopy ( unsigned int  maxlength = 0  )  [pure 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.

Implemented in iopc::ENumber< T >, iopc::EStr< T >, iopc::DbPtrBase, iopc::EStr< wchar_t >, and iopc::EStr< char >.

virtual void* iopc::EnhancedTypeBase::externalizeEmptyBuffer ( unsigned int  length = 0  )  [pure 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.

Implemented in iopc::ENumber< T >, iopc::EStr< T >, iopc::DbPtrBase, iopc::EStr< wchar_t >, and iopc::EStr< char >.

virtual const Type& iopc::EnhancedTypeBase::getInnerType (  )  const [pure 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.

Implemented in iopc::ENumber< T >, iopc::EStr< T >, iopc::DbPtrBase, iopc::EStr< wchar_t >, and iopc::EStr< char >.

void iopc::EnhancedTypeBase::init (  )  [static]

Initializes all enhanced data types.

Called by TypeManager::init() from IopcMeta::init()

const Type & iopc::EnhancedTypeBase::getInnerTypeFor ( const Type enhancedType  )  [static]

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.

Static variant for enhancedType.getInnerType()


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

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