OpendTect  6.3
picksetmanager.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: May 2001 / Mar 2016
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "geometrymod.h"
14 #include "saveablemanager.h"
15 #include "pickset.h"
16 
17 
18 namespace Pick
19 {
20 class SetLoaderExec;
21 
22 
31 public:
32 
33  ConstRefMan<Set> fetch(const ObjID&,uiRetVal&,
34  const char* category=0) const;
35  RefMan<Set> fetchForEdit(const ObjID&,uiRetVal&,
36  const char* category=0);
37  ConstRefMan<Set> fetch(const ObjID&) const;
38  RefMan<Set> fetchForEdit(const ObjID&);
39 
40  ObjID getID(const Set&) const;
41 
42  uiRetVal store(const Set&,const IOPar* ioobjpars=0) const;
44  uiRetVal store(const Set&,const ObjID&,
45  const IOPar* ioobjpars=0) const;
46  uiRetVal save(const ObjID&) const;
47  uiRetVal save(const Set&) const;
48  bool needsSave(const ObjID&) const;
49  bool needsSave(const Set&) const;
50 
51  bool isPolygon(const ObjID&) const;
52  bool hasCategory(const ObjID&,const char*) const;
53 
54  // Use MonitorLock when iterating
55  ConstRefMan<Set> get(IdxType) const;
56  RefMan<Set> getForEdit(IdxType);
57 
58 protected:
59 
60  SetManager();
61  ~SetManager();
62 
63  virtual Saveable* getSaver(const SharedObject&) const;
64  virtual ChangeRecorder* getChangeRecorder(const SharedObject&) const;
65 
66  template<class T> T doFetch(const ObjID&,uiRetVal&,const char* cat=0) const;
67  Set* gtSet(const ObjID&) const;
68 
69 public:
70 
72 
73 };
74 
75 
77 inline SetManager& SetMGR()
78 {
79  return SetManager::getInstance();
80 }
81 
82 } // namespace Pick
#define mExpClass(module)
Definition: commondefs.h:157
size_type IdxType
Definition: saveablemanager.h:47
short IdxType
Definition: seisblocksdata.h:39
#define mODTextTranslationClass(clss)
Definition: uistring.h:37
#define mDeclareSaveableManagerInstance(typ)
Definition: saveablemanager.h:145
Definition: sharedobject.h:18
Object that can be saved at any time.
Definition: saveable.h:23
SetManager & SetMGR()
access to the singleton Pick Set Manager
Definition: picksetmanager.h:77
Monitorable set of pick locations.
Definition: pickset.h:41
base class for recorder of changes in a Monitorable
Definition: monitorchangerecorder.h:20
Base class for managers of Saveable objects: loading and storing.
Definition: saveablemanager.h:41
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
Manages all stored Pick::Set&#39;s.
Definition: picksetmanager.h:29
Definition: uistring.h:299
Definition: picklocation.h:19
Definition: ptrman.h:227
Definition: arraytesselator.h:19
Definition: ptrman.h:200

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