OSB_DB::OtlType Class Reference

Inheritance diagram for OSB_DB::OtlType:

Inheritance graph
[legend]
Collaboration diagram for OSB_DB::OtlType:

Collaboration graph
[legend]
List of all members.

Detailed Description

Interface class between database INTEGER types and type safe object identifiers OSB_LIB::Type<T>.

OtlType extends otl_value<long> with a conversion from an OSB object type identifier, which converts an unset type id to a NULL value.
This makes it easy to use a nullable id in a database transaction.

Definition at line 58 of file otltype.h.

Public Member Functions

Constructors to retain otl_value<T> functionality.

Constructor & Destructor Documentation

OSB_DB::OtlType::OtlType (  )  [inline]

Default constructor.

Definition at line 63 of file otltype.h.

OSB_DB::OtlType::OtlType ( const otl_null &  rhs  )  [inline]

Conversion from otl_null.

Definition at line 65 of file otltype.h.

template<typename T, int ST>
OSB_DB::OtlType::OtlType ( const OSB_LIB::TypeId< T, ST > &  rhs  )  [inline, explicit]

Conversion from type safe OSB type identifiers.

Value is mapped to NULL if the type identifier is not set.

Definition at line 73 of file otltype.h.

References OSB_LIB::TypeId< T, ST >::notSet().


Member Function Documentation

template<typename T, int ST>
OSB_LIB::TypeId<T, ST> OSB_DB::OtlType::mkType ( OSB_LIB::TypeId< T, ST > &  dest  )  const [inline]

For use in the constructor of an OSB type identifier.

A NULL value is translated to OSB_LIB::Type<T>().

Parameters:
dest Type identifier to populate, see below.
Returns:
Reference to dest.
Note:
The argument allows for implicit template instantiation:
          OtlType origin;
          OtlType dest;
          // fetch into origin ...
          OSB_LIB::CpMapper::Type t;
          OSB_LIB::UsageMapping mapDef(ut,
                                       origin.mkType(t),
                                       dest.mkType(t));

Definition at line 98 of file otltype.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:09:02 2006 for OSB Library by  doxygen 1.4.7