40 virtual od_int64 nrItems()
const = 0;
41 virtual bool validIdx(
od_int64)
const = 0;
43 virtual void erase() = 0;
45 inline bool isEmpty()
const {
return nrItems() <= 0; }
56 template <
class ODSET,
class size_type>
57 inline void removeRange( ODSET& inst, size_type start, size_type stop )
59 inst.removeRange( start, stop );
66 template <
class ODSET,
class WITHADD>
67 inline void addNames(
const ODSET& inp, WITHADD& withadd )
69 const typename ODSET::size_type sz = inp.size();
70 for (
typename ODSET::size_type idx=0; idx<sz; idx++ )
71 withadd.add( inp[idx]->name() );
74 #define mODSetApplyToAll( itp, os, op ) \ 75 for ( itp idx=(itp) os.nrItems()-1; idx>=0; idx-- ) \ #define mExpClass(module)
Definition: commondefs.h:160
#define od_int64
Definition: plftypes.h:36
bool isEmpty() const
Definition: odset.h:45
virtual ~Set()
Definition: odset.h:38
void setEmpty()
Definition: odset.h:46
void removeRange(ODSET &inst, size_type start, size_type stop)
Removes a range from the set.
Definition: odset.h:57
Base class for all sets used in OpendTect.
Definition: odset.h:34
OpendTect.
Definition: commontypes.h:29
void addNames(const ODSET &inp, WITHADD &withadd)
Adds all names from a set to another set with an add() function (typically a BufferStringSet) ...
Definition: odset.h:67