38 virtual od_int64 nrItems()
const = 0;
39 virtual bool validIdx(
od_int64)
const = 0;
41 virtual void erase() = 0;
43 inline bool isEmpty()
const {
return nrItems() <= 0; }
54 template <
class ODSET,
class size_type>
55 inline void removeRange( ODSET& inst, size_type start, size_type stop )
57 inst.removeRange( start, stop );
64 template <
class ODSET,
class WITHADD>
65 inline void addNames(
const ODSET& inp, WITHADD& withadd )
67 const typename ODSET::size_type sz = inp.size();
68 for (
typename ODSET::size_type idx=0; idx<sz; idx++ )
69 withadd.add( inp[idx]->name() );
72 #define mODSetApplyToAll( itp, os, op ) \ 73 for ( itp idx=(itp) os.nrItems()-1; idx>=0; idx-- ) \ #define mExpClass(module)
Definition: commondefs.h:157
#define od_int64
Definition: plftypes.h:34
bool isEmpty() const
Definition: odset.h:43
virtual ~Set()
Definition: odset.h:36
void setEmpty()
Definition: odset.h:44
void removeRange(ODSET &inst, size_type start, size_type stop)
Removes a range from the set.
Definition: odset.h:55
Base class for all sets used in OpendTect.
Definition: odset.h:32
OpendTect.
Definition: commontypes.h:25
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:65