 |
OpendTect
6.6
|
Go to the documentation of this file.
45 inline bool isEmpty()
const {
return nrItems() <= 0; }
58 template <
class ODSET,
class size_type>
59 inline void removeRange( ODSET& inst, size_type start, size_type stop )
61 inst.removeRange( start, stop );
68 template <
class ODSET,
class SET>
69 inline void addNames(
const ODSET& inp, SET& setwithadd )
71 for (
auto obj : inp )
73 setwithadd.add( obj->name() );
80 # define mTypeName typename
83 #define mIsContainer( clss, typ, memb ) \
86 typedef typ impl_type; \
91 typedef mTypeName impl_type::size_type size_type; \
92 typedef mTypeName impl_type::idx_type idx_type; \
93 typedef mTypeName impl_type::object_type object_type; \
94 typedef mTypeName impl_type::value_type value_type; \
95 typedef mTypeName impl_type::iterator iterator; \
96 typedef mTypeName impl_type::const_iterator const_iterator; \
97 typedef mTypeName impl_type::difference_type difference_type; \
98 typedef mTypeName impl_type::reference reference; \
99 typedef mTypeName impl_type::const_reference const_reference; \
101 iterator begin() { return memb.begin(); } \
102 const_iterator begin() const { return memb.cbegin(); } \
103 const_iterator cbegin() const { return memb.cbegin(); } \
104 iterator end() { return memb.end(); } \
105 const_iterator end() const { return memb.cend(); } \
106 const_iterator cend() const { return memb.cend(); } \
107 inline size_type max_size() const { return memb.max_size(); } \
108 inline bool empty() const { return memb.empty(); } \
109 inline void swap( clss& oth ) { memb.swap(oth.memb); } \
111 size_type getIdx( iterator it ) const { return memb.getIdx(it); } \
112 size_type getIdx( const_iterator it ) const { return memb.getIdx(it); }
115 #define mDefContainerSwapFunction( mod, clss ) \
116 mGlobal(mod) inline void swap( clss& o1, clss& o2 ) \
122 #define mODSetApplyToAll( itp, os, op ) \
123 for ( itp idx=(itp) os.nrItems()-1; idx>=0; idx-- ) \
virtual void swapItems(int64_t, int64_t)=0
virtual bool validIdx(int64_t) const =0
virtual Set * clone() const =0
#define od_int64
Definition: plftypes.h:35
OpendTect.
Definition: commontypes.h:28
#define mExpClass(module)
Definition: commondefs.h:177
static int64_t maxIdx64()
Definition: odset.h:49
bool isEmpty() const
Definition: odset.h:45
virtual int64_t nrItems() const =0
static int maxIdx32()
Definition: odset.h:48
#define od_int32
Definition: plftypes.h:30
void addNames(const ODSET &inp, SET &setwithadd)
Adds all names from a set to another set with an add() function (typically a BufferStringSet)
Definition: odset.h:69
virtual ~Set()
Definition: odset.h:37
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:59
Base class for all sets used in OpendTect.
Definition: odset.h:33
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021