OSB_LIB::Id2< I > Struct Template Reference

Inheritance diagram for OSB_LIB::Id2< I >:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::Id2< I >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename I>
struct OSB_LIB::Id2< I >

Type-safe object identification with 2 integer.

See template<typename T> Id for the motivation.

In the OSB library many classes support versions, e.g. TariffPeriod an TpVersion.
This template provides object identifiers to support such relationships.

Todo:
template<typename Child, typename Parent>?
However this is meaningful only to compare with the parents object id => small benefit.

Definition at line 135 of file osbid.h.

Public Member Functions

Comparison operators:
All operators do comparsion on id1_ (frist priority) and id2_.

Public Attributes


Constructor & Destructor Documentation

template<typename I>
OSB_LIB::Id2< I >::Id2 (  )  [inline]

Empty default constructor.

Definition at line 137 of file osbid.h.

template<typename I>
OSB_LIB::Id2< I >::Id2 ( long  id1  )  [inline, explicit]

Constructor with first identifier.

Definition at line 139 of file osbid.h.

template<typename I>
OSB_LIB::Id2< I >::Id2 ( long  id1,
long  id2 
) [inline]

Constructor with both identifiers.

Definition at line 141 of file osbid.h.


Member Function Documentation

template<typename I>
bool OSB_LIB::Id2< I >::id1Set (  )  const [inline]

Frist identifier set?

Definition at line 159 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::id2Set (  )  const [inline]

Second identifier set?

Definition at line 161 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::isSet (  )  const [inline]

Object id set?

Returns:
false if both id are ID_NOT_SET, else true.

Definition at line 148 of file osbid.h.

Referenced by OSB_LIB::Id2< OSB_LIB::PersProductNode >::notSet().

template<typename I>
bool OSB_LIB::Id2< I >::notSet (  )  const [inline]

Object id not set?

Returns:
true if both id are ID_NOT_SET, else false.

Definition at line 157 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator!= ( const Id2< I > &  rhs  )  const [inline]

Definition at line 173 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator< ( const Id2< I > &  rhs  )  const [inline]

Definition at line 178 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator<= ( const Id2< I > &  rhs  )  const [inline]

Definition at line 190 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator== ( const Id2< I > &  rhs  )  const [inline]

Definition at line 168 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator> ( const Id2< I > &  rhs  )  const [inline]

Definition at line 185 of file osbid.h.

template<typename I>
bool OSB_LIB::Id2< I >::operator>= ( const Id2< I > &  rhs  )  const [inline]

Definition at line 195 of file osbid.h.


Member Data Documentation

template<typename I>
long OSB_LIB::Id2< I >::id1_

Primary id: usually the one of the parent object.

Definition at line 203 of file osbid.h.

Referenced by OSB_LIB::Id2< OSB_LIB::PersProductNode >::id1Set(), OSB_LIB::Id2< OSB_LIB::PersProductNode >::isSet(), OSB_LIB::Id2< OSB_LIB::PersProductNode >::operator<(), OSB_LIB::Id2< OSB_LIB::PersProductNode >::operator==(), and OSB_LIB::PricelistCfg::pricelistId().

template<typename I>
long OSB_LIB::Id2< I >::id2_

Secondary id: usually this identifes the child or the version.

Definition at line 205 of file osbid.h.

Referenced by OSB_LIB::Id2< OSB_LIB::PersProductNode >::id2Set(), OSB_LIB::Id2< OSB_LIB::PersProductNode >::isSet(), OSB_LIB::Id2< OSB_LIB::PersProductNode >::operator<(), and OSB_LIB::Id2< OSB_LIB::PersProductNode >::operator==().


The documentation for this struct was generated from the following file:
Generated on Sat Sep 2 14:12:10 2006 for OSB Library by  doxygen 1.4.7