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

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

Inheritance diagram for SortedTable< IDT, T >:
[legend]

Public Types

typedef int size_type
 
typedef T object_type
 

Public Member Functions

 SortedTable ()
 
size_type size () const
 
void set (IDT id, T val)
 
bool get (IDT id, T &val) const
 
const IDT & id (size_type idx) const
 
const T & val (size_type idx) const
 
bool remove (IDT id)
 
void erase ()
 

Private Attributes

TypeSet< T > vals_
 
SortedList< IDT > ids_
 

Detailed Description

template<class IDT, class T>
class SortedTable< IDT, T >

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

Member Typedef Documentation

template<class IDT, class T>
typedef T SortedTable< IDT, T >::object_type
template<class IDT, class T>
typedef int SortedTable< IDT, T >::size_type

Constructor & Destructor Documentation

template<class IDT , class T >
SortedTable< IDT, T >::SortedTable ( )
inline

Member Function Documentation

template<class IDT, class T>
void SortedTable< IDT, T >::erase ( )
inline
template<class IDT, class T>
bool SortedTable< IDT, T >::get ( IDT  id,
T &  val 
) const
inline

If id is not found, val is unchanged and false is returned. If id is found, val is set and true is returned.

template<class IDT, class T>
const IDT& SortedTable< IDT, T >::id ( size_type  idx) const
inline
template<class IDT, class T >
bool SortedTable< IDT, T >::remove ( IDT  id)
inline
template<class IDT, class T>
void SortedTable< IDT, T >::set ( IDT  id,
val 
)
inline
template<class IDT, class T>
size_type SortedTable< IDT, T >::size ( ) const
inline
template<class IDT, class T>
const T& SortedTable< IDT, T >::val ( size_type  idx) const
inline

Member Data Documentation

template<class IDT, class T>
SortedList<IDT> SortedTable< IDT, T >::ids_
private
template<class IDT, class T>
TypeSet<T> SortedTable< IDT, T >::vals_
private

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