OpendTect-6_4  6.4
Public Types | Public Member Functions | Private Attributes | List of all members
SortedPointers< T > Class Template Reference

A SortedPointers keeps track of ids and their corresponding pointer. Each id can only be present once. More...

Public Types

typedef int size_type
 
typedef int id_type
 

Public Member Functions

 SortedPointers ()
 
 ~SortedPointers ()
 
size_type size () const
 
void set (id_type, T *)
 
const T * get (id_type) const
 
T * get (id_type)
 
const T * getByPos (size_type pos) const
 
T * getByPos (size_type pos)
 
id_type id (size_type pos) const
 
bool remove (id_type id)
 
void removePos (size_type)
 
void erase ()
 

Private Attributes

ObjectSet< T > vals_
 
SortedList< size_typeids_
 

Detailed Description

template<class T>
class SortedPointers< T >

A SortedPointers keeps track of ids and their corresponding pointer. Each id can only be present once.

Member Typedef Documentation

template<class T >
typedef int SortedPointers< T >::id_type
template<class T >
typedef int SortedPointers< T >::size_type

Constructor & Destructor Documentation

template<class T >
SortedPointers< T >::SortedPointers ( )
inline
template<class T >
SortedPointers< T >::~SortedPointers ( )
inline

Member Function Documentation

template<class T >
void SortedPointers< T >::erase ( )
inline
template<class T >
const T * SortedPointers< T >::get ( id_type  iid) const
inline
template<class T >
T * SortedPointers< T >::get ( id_type  iid)
inline
template<class T >
const T* SortedPointers< T >::getByPos ( size_type  pos) const
inline
template<class T >
T* SortedPointers< T >::getByPos ( size_type  pos)
inline
template<class T >
id_type SortedPointers< T >::id ( size_type  pos) const
inline
template<class T >
bool SortedPointers< T >::remove ( id_type  id)
inline
template<class T >
void SortedPointers< T >::removePos ( size_type  pos)
inline
template<class T >
void SortedPointers< T >::set ( id_type  iid,
T *  val 
)
inline
template<class T >
size_type SortedPointers< T >::size ( ) const
inline

Member Data Documentation

template<class T >
SortedList<size_type> SortedPointers< T >::ids_
private
template<class T >
ObjectSet<T> SortedPointers< T >::vals_
private

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019