BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlcc::SkipListPairHandle< KEY, DATA > Class Template Reference

#include <bdlcc_skiplist.h>

Public Member Functions

 SkipListPairHandle ()
 Construct a new PairHandle that does not refer to a pair.
 
 SkipListPairHandle (const SkipListPairHandle &original)
 
 ~SkipListPairHandle ()
 
SkipListPairHandleoperator= (const SkipListPairHandle &rhs)
 
void release ()
 Release the reference (if any) managed by this SkipListPairHandle.
 
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 bdlcc_skiplist

Constructor & Destructor Documentation

◆ SkipListPairHandle() [1/2]

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

◆ SkipListPairHandle() [2/2]

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

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

◆ ~SkipListPairHandle()

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

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

Member Function Documentation

◆ data()

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

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

◆ isValid()

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

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

◆ key()

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

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.

◆ operator const Pair *()

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.

◆ operator=()

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

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.

◆ release()

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

◆ releaseReferenceRaw()

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

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

Friends And Related Symbol Documentation

◆ SkipList< KEY, DATA >

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

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