OpendTect  6.3
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
MonitorableIterBase< ITyp > Class Template Reference

base class for Monitorable iterators. Inherit from one of its subclasses. More...

Inheritance diagram for MonitorableIterBase< ITyp >:
[legend]

Public Types

enum  Direction { Forward, Backward }
 
typedef ITyp IdxType
 
typedef IdxType size_type
 

Public Member Functions

 MonitorableIterBase (const Monitorable &, IdxType startidx, IdxType stopidx)
 
 MonitorableIterBase (const MonitorableIterBase &)
 
virtual ~MonitorableIterBase ()
 
const Monitorablemonitored () const
 
bool isEmpty () const
 
size_type size () const
 
bool next ()
 
bool isForward () const
 
bool isValid () const
 
bool atFirst () const
 
bool atLast () const
 
IdxType curIdx () const
 
bool isPresent (IdxType) const
 
virtual void retire ()
 
virtual void reInit ()
 

Protected Attributes

const Monitorableobj_
 
const Direction dir_
 
const IdxType startidx_
 
const IdxType stopidx_
 
IdxType curidx_
 

Private Member Functions

MonitorableIterBaseoperator= (const MonitorableIterBase &)
 

Detailed Description

template<class ITyp>
class MonitorableIterBase< ITyp >

base class for Monitorable iterators. Inherit from one of its subclasses.

Needs a next() before a valid item is reached.

It is your responisbility to keep the Monitorable alive. The iterator cannot itself be used in a Multi-Threaded way.

If you pass a negative startidx or stopidx, then the iterator will be empty (no matter the value of the other idx).

Member Typedef Documentation

template<class ITyp>
typedef ITyp MonitorableIterBase< ITyp >::IdxType
template<class ITyp>
typedef IdxType MonitorableIterBase< ITyp >::size_type

Member Enumeration Documentation

template<class ITyp>
enum MonitorableIterBase::Direction
Enumerator
Forward 
Backward 

Constructor & Destructor Documentation

template<class ITyp >
MonitorableIterBase< ITyp >::MonitorableIterBase ( const Monitorable obj,
IdxType  startidx,
IdxType  stopidx 
)
inline
template<class ITyp >
MonitorableIterBase< ITyp >::MonitorableIterBase ( const MonitorableIterBase< ITyp > &  oth)
inline
template<class ITyp>
virtual MonitorableIterBase< ITyp >::~MonitorableIterBase ( )
inlinevirtual

Member Function Documentation

template<class ITyp>
bool MonitorableIterBase< ITyp >::atFirst ( ) const
inline
template<class ITyp>
bool MonitorableIterBase< ITyp >::atLast ( ) const
inline
template<class ITyp>
IdxType MonitorableIterBase< ITyp >::curIdx ( ) const
inline
template<class ITyp>
bool MonitorableIterBase< ITyp >::isEmpty ( ) const
inline
template<class ITyp>
bool MonitorableIterBase< ITyp >::isForward ( ) const
inline
template<class ITyp >
bool MonitorableIterBase< ITyp >::isPresent ( IdxType  idx) const
inline
template<class ITyp>
bool MonitorableIterBase< ITyp >::isValid ( ) const
inline
template<class ITyp>
const Monitorable& MonitorableIterBase< ITyp >::monitored ( ) const
inline
template<class ITyp >
bool MonitorableIterBase< ITyp >::next ( )
inline
template<class ITyp>
MonitorableIterBase& MonitorableIterBase< ITyp >::operator= ( const MonitorableIterBase< ITyp > &  )
inlineprivate
template<class ITyp >
void MonitorableIterBase< ITyp >::reInit ( )
inlinevirtual
template<class ITyp>
virtual void MonitorableIterBase< ITyp >::retire ( )
inlinevirtual
template<class ITyp >
MonitorableIterBase< ITyp >::size_type MonitorableIterBase< ITyp >::size ( ) const
inline

Member Data Documentation

template<class ITyp>
IdxType MonitorableIterBase< ITyp >::curidx_
protected
template<class ITyp>
const Direction MonitorableIterBase< ITyp >::dir_
protected
template<class ITyp>
const Monitorable& MonitorableIterBase< ITyp >::obj_
protected
template<class ITyp>
const IdxType MonitorableIterBase< ITyp >::startidx_
protected
template<class ITyp>
const IdxType MonitorableIterBase< ITyp >::stopidx_
protected

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