OpendTect  6.6
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 id_type
 
typedef int size_type
 

Public Member Functions

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

Private Attributes

SortedList< size_typeids_
 
ObjectSet< T > vals_
 

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

◆ id_type

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

◆ size_type

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

Constructor & Destructor Documentation

◆ SortedPointers()

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

◆ ~SortedPointers()

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

Member Function Documentation

◆ erase()

template<class T >
void SortedPointers< T >::erase
inline

◆ get() [1/2]

template<class T >
T * SortedPointers< T >::get ( id_type  iid)
inline

◆ get() [2/2]

template<class T >
const T * SortedPointers< T >::get ( id_type  iid) const
inline

◆ getByPos() [1/2]

template<class T >
T* SortedPointers< T >::getByPos ( size_type  pos)
inline

◆ getByPos() [2/2]

template<class T >
const T* SortedPointers< T >::getByPos ( size_type  pos) const
inline

◆ id()

template<class T >
id_type SortedPointers< T >::id ( size_type  pos) const
inline

◆ remove()

template<class T >
bool SortedPointers< T >::remove ( id_type  id)
inline

◆ removePos()

template<class T >
void SortedPointers< T >::removePos ( size_type  pos)
inline

◆ set()

template<class T >
void SortedPointers< T >::set ( id_type  iid,
T *  val 
)
inline

◆ size()

template<class T >
size_type SortedPointers< T >::size ( ) const
inline

Member Data Documentation

◆ ids_

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

◆ vals_

template<class T >
ObjectSet<T> SortedPointers< T >::vals_
private

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