39 int size()
const {
return pss_.size(); }
40 Set&
get(
int idx ) {
return *pss_[idx]; }
41 const Set&
get(
int idx )
const {
return *pss_[idx]; }
42 const MultiID& id(
int idx )
const;
52 Set&
get(
const char* s ) {
return *
find(s); }
53 const Set&
get(
const char* s )
const {
return *
find(s); }
59 void setID(
int idx,
const MultiID&);
63 enum Ev { Added, Changed, ToBeRemoved };
66 : ev_(e), set_(s), loc_(l) {}
86 {
return idx < changed_.size()
87 ? (bool) changed_[idx] :
false;}
89 {
if ( changed_.validIdx(idx) ) changed_[idx] = !yn; }
92 const Undo& undo()
const;
95 bool readDisplayPars(
const MultiID&,
IOPar&)
const;
96 bool writeDisplayPars(
const MultiID&,
const IOPar&)
const;
98 static SetMgr& getMgr(
const char*);
111 void add(
const MultiID&,
Set*);
112 Set*
find(
const MultiID&)
const;
113 MultiID*
find(
const Set&)
const;
const Set * set_
Definition: picksetmgr.h:69
#define mExpClass(module)
Definition: commondefs.h:160
Notifier< SetMgr > setDispChanged
passes Set*
Definition: picksetmgr.h:82
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
Ev
Definition: picksetmgr.h:63
Undo & undo_
Definition: picksetmgr.h:106
Notifier< SetMgr > setAdded
passes Set*
Definition: picksetmgr.h:80
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
Ev ev_
Definition: picksetmgr.h:68
bool isChanged(int idx) const
Definition: picksetmgr.h:85
Class to handle undo/redo information.
Definition: undo.h:42
Definition: callback.h:254
Set of picks with something in common.
Definition: pickset.h:31
Set of pointers to objects.
Definition: commontypes.h:32
const int loc_
Definition: picksetmgr.h:70
Notifier< SetMgr > locationChanged
Passes ChangeData*.
Definition: picksetmgr.h:78
Notifier< SetMgr > setChanged
passes Set*
Definition: picksetmgr.h:81
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Notifier< SetMgr > setToBeRemoved
Passes Set*.
Definition: picksetmgr.h:79
void setUnChanged(int idx, bool yn=true)
Definition: picksetmgr.h:88
BoolTypeSet changed_
Definition: picksetmgr.h:109
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
static SetMgr & getMgr(const char *)
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Object with a name.
Definition: namedobj.h:35
Definition: picklocation.h:21
TypeSet< MultiID > ids_
Definition: picksetmgr.h:108
int size() const
Definition: picksetmgr.h:39
SetMgr & Mgr()
Definition: picksetmgr.h:126
Definition: picksetmgr.h:61
Utility to manage pick set lifecycles. Also supports change notifications.
Definition: picksetmgr.h:34
ObjectSet< Set > pss_
Definition: picksetmgr.h:107
ChangeData(Ev e, const Set *s, int l)
Definition: picksetmgr.h:65
Compound key consisting of ints.
Definition: multiid.h:25