SBCReferencePointerIndexer< ReferenceTargetType, ReferenceToTargetType > Class Template Reference


iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const

Heap management

static void * operator new (std::size_t size)
static void operator delete (void *p, std::size_t size)

Constructors and destructors

 SBCReferencePointerIndexer ()
 SBCReferencePointerIndexer (unsigned int initialSize)
 SBCReferencePointerIndexer (const SBCReferencePointerIndexer &pointerIndex)
virtual ~SBCReferencePointerIndexer ()

Indexing via references

ReferenceToTargetType * getReferenceToTarget (unsigned int referenceToTargetIndex) const

Indexing via targets

ReferenceTargetType * getReferenceTarget (unsigned int referenceTargetIndex) const
ReferenceTargetType * operator[] (unsigned int referenceTargetIndex) const

Detailed Description

template<class ReferenceTargetType = SBCReferenceTarget, class ReferenceToTargetType = SBCReferenceToTarget>
class SBCReferencePointerIndexer< ReferenceTargetType, ReferenceToTargetType >

The class SBCReferenceOwnerIndexer implements an owner which references targets (or references to targets) through an indexer. Finding the index associated to a target takes an almost constant time, while accessing a target given its index takes constant time.