Quick Links:

bal | bbl | bdl | bsl

Public Member Functions | Friends

bdlcc::SkipListPairHandle< KEY, DATA > Class Template Reference

#include <bdlcc_skiplist.h>

List of all members.

Public Member Functions

 SkipListPairHandle ()
 SkipListPairHandle (const SkipListPairHandle &original)
 ~SkipListPairHandle ()
SkipListPairHandleoperator= (const SkipListPairHandle &rhs)
void release ()
void releaseReferenceRaw (SkipList< KEY, DATA > **list, Pair **reference)
 operator const Pair * () const
DATA & data () const
const KEY & key () const
bool isValid () const

Friends

class SkipList< KEY, DATA >

Detailed Description

template<class KEY, class DATA>
class bdlcc::SkipListPairHandle< KEY, DATA >

Objects of this class refer to an association (pair) in a SkipList. A bdlcc::SkipListPairHandle is implicitly convertible to a const Pair* and thus may be used anywhere in the SkipList API that a const Pair* is expected.

See Component bdlcc_skiplist


Constructor & Destructor Documentation

template<class KEY , class DATA >
bdlcc::SkipListPairHandle< KEY, DATA >::SkipListPairHandle (  ) 

Construct a new PairHandle that does not refer to a pair.

template<class KEY , class DATA >
bdlcc::SkipListPairHandle< KEY, DATA >::SkipListPairHandle ( const SkipListPairHandle< KEY, DATA > &  original  ) 

Construct a new pair reference for the same list and pair as the specified original.

template<class KEY , class DATA >
bdlcc::SkipListPairHandle< KEY, DATA >::~SkipListPairHandle (  ) 

Destroy this SkipListPairHandle. If this SkipListPairHandle refers to a pair in the list, release the reference.


Member Function Documentation

template<class KEY , class DATA >
SkipListPairHandle& bdlcc::SkipListPairHandle< KEY, DATA >::operator= ( const SkipListPairHandle< KEY, DATA > &  rhs  ) 

Change this SkipListPairHandle to refer to the same list and pair as the specified rhs. If this SkipListPairHandle initially refers to a pair, release the reference. Return *this.

template<class KEY , class DATA >
void bdlcc::SkipListPairHandle< KEY, DATA >::release (  ) 

Release the reference (if any) managed by this SkipListPairHandle.

template<class KEY , class DATA >
void bdlcc::SkipListPairHandle< KEY, DATA >::releaseReferenceRaw ( SkipList< KEY, DATA > **  list,
Pair **  reference 
)

Invoke release and populate the specified list and reference pointers with the list and reference values of this SkipListPairHandle.

template<class KEY , class DATA >
bdlcc::SkipListPairHandle< KEY, DATA >::operator const Pair * (  )  const

Return the address of the pair referred to by this SkipListPairHandle, or 0 if this handle does not manage a reference.

template<class KEY , class DATA >
DATA& bdlcc::SkipListPairHandle< KEY, DATA >::data (  )  const

Return a reference to the "data" value of the pair referred to by this object. The behavior is undefined unless isValid returns true.

template<class KEY , class DATA >
const KEY& bdlcc::SkipListPairHandle< KEY, DATA >::key (  )  const

Return a reference to the non-modifiable "key" value of the pair referred to by this object. The behavior is undefined unless isValid returns true.

template<class KEY , class DATA >
bool bdlcc::SkipListPairHandle< KEY, DATA >::isValid (  )  const

Return true if this PairHandle currently refers to a pair, and false otherwise.


Friends And Related Function Documentation

template<class KEY , class DATA >
friend class SkipList< KEY, DATA > [friend]

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