#include <OTC/collctn/prbucket.hh> template<class T1, class T2> class OTC_PairBucket : public OTC_Bucket<T2> {
public:
static os_typespec* get_os_typespec();
OTC_PairBucket(T1 const& theKey, T2 const& theItem);
~OTC_PairBucket();
inline T1& key();
};
OTC_PairBucket
derives from OTC_Bucket
in order that both a
key and item can be encapsulated into a single bucket. To manage
resources, when parameterised over a pointer type, it is possible
to define an explicit version of OTC_BaseActions
. This allows
specific actions to be performed at the point that the key and
item are added to the bucket, and when the bucket is deleted.
OTC_PairBucket(T1 const& theKey, T2 const& theItem);
theKey
and
theItem
. The appropriate
OTC_BaseActions<T>::add()
function is
called on both the key and item.
~OTC_PairBucket();
OTC_BaseActions<T>::remove()
function
is called on both the key and item.
inline T1& key();
OTC_Bucket
, OTC_BaseActions