OpendTect  6.6
emmanager.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: Kristofer Tingdahl
8  Date: 4-11-2002
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 
13 -*/
14 
15 #include "earthmodelmod.h"
16 #include "sets.h"
17 #include "bufstring.h"
18 #include "callback.h"
19 #include "factory.h"
20 #include "ptrman.h"
21 #include "ranges.h"
22 #include "multiid.h"
23 #include "emposid.h"
24 #include "emundo.h"
25 
26 class Undo;
27 class IOObj;
28 class IOObjContext;
29 class TaskRunner;
30 class Executor;
31 class uiEMPartServer;
32 
33 template <class T> class Selector;
34 
35 namespace EM
36 {
37 class EMObject;
38 class SurfaceIOData;
39 class SurfaceIODataSelection;
40 
45 mExpClass(EarthModel) EMManager : public CallBacker
46 {
47 public:
50 
51  inline int nrLoadedObjects() const { return objects_.size(); }
52  inline int size() const { return nrLoadedObjects(); }
53  EM::ObjectID objectID(int idx) const;
54  bool objectExists(const EMObject*) const;
55 
63  const EMObject* getObject(const ObjectID&) const;
64  EMObject* createTempObject(const char* type);
65 
68  const char* objectType(const MultiID&) const;
71  ObjectID getObjectID(const MultiID&) const;
75  MultiID getMultiID(const ObjectID&) const;
80  void burstAlertToAll(bool yn);
81 
83  TaskRunner*);
84  bool readDisplayPars(const MultiID&,IOPar&) const;
85  bool writeDisplayPars(const MultiID&,const IOPar&) const;
87  uiString& errmsg) const;
88 
90 
91 protected:
92 
93  mStruct(EarthModel) EMObjUndo
94  {
95  EMObjUndo(const EM::ObjectID& id)
96  : undo_(*new EMUndo()),id_(id) {}
97 
98  ~EMObjUndo() { delete &undo_; }
99  Undo& undo_;
100  EM::ObjectID id_;
101  };
102 
104 
106  /*don't use it, only for keep ABI */
107 
109 
111  static const char* displayparameterstr();
112 
114  IOPar&)const;
116  IOPar&)const;
117  int undoIndexOf(const EM::ObjectID& id);
118 
119 public:
120 
121  // Don't use unless you know what you are doing
122 
123  void setEmpty();
124 
126  const SurfaceIODataSelection* =0);
128  const SurfaceIODataSelection* =0,
129  TypeSet<MultiID>* idstobeloaded =0);
133  EM::ObjectID createObject(const char* type,const char* name);
137  /*Interface from EMObject to report themselves */
139  void removeObject(const EMObject*);
140 
141  Undo& undo();
142  /*don't use it, only for keep ABI */
143  const Undo& undo() const;
144  /*don't use it, only for keep ABI */
145 
148 
149 };
150 
151 
152 mDefineFactory1Param( EarthModel, EMObject, EMManager&, EMOF );
153 
154 mGlobal(EarthModel) EMManager& EMM();
155 mGlobal(EarthModel) bool canOverwrite(const MultiID&);
156 
157 } // namespace EM
158 
EM::EMManager::objectExists
bool objectExists(const EMObject *) const
Selector
Interface for classes that select on basis of a key.
Definition: selector.h:25
emposid.h
EM::mDefineFactory1Param
mDefineFactory1Param(EarthModel, EMObject, EMManager &, EMOF)
EM::canOverwrite
bool canOverwrite(const MultiID &)
EM::EMManager::eraseUndoList
void eraseUndoList()
EM::EMManager::objectName
BufferString objectName(const MultiID &) const
factory.h
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
EM::EMManager::createTempObject
EMObject * createTempObject(const char *type)
EM::EMManager::loadIfNotFullyLoaded
EMObject * loadIfNotFullyLoaded(const MultiID &, TaskRunner *=0)
ObjectSet< EMObjUndo >
EM::SurfaceIOData
Data interesting for Surface I/O.
Definition: emsurfaceiodata.h:30
EM::EMManager::readDisplayPars
bool readDisplayPars(const MultiID &, IOPar &) const
EM::EMManager::writeDisplayPars
bool writeDisplayPars(const MultiID &, const IOPar &) const
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
EM::EMM
EMManager & EMM()
EM::EMManager::readParsFromGeometryInfoFile
bool readParsFromGeometryInfoFile(const MultiID &, IOPar &) const
callback.h
EM::EMManager::~EMManager
~EMManager()
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
EM
Earth Model objects like horizons, faults, fault-sticks and bodies.
Definition: bulk2dhorizonscanner.h:26
bufstring.h
EM::EMUndo
Set position UndoEvent.
Definition: emundo.h:33
EM::EMManager::removeSelected
void removeSelected(const ObjectID &, const Selector< Coord3 > &, TaskRunner *)
EM::EMManager::addRemove
Notifier< EMManager > addRemove
Definition: emmanager.h:89
EM::EMManager::nrLoadedObjects
int nrLoadedObjects() const
Definition: emmanager.h:51
EM::EMManager::EMManager
EMManager()
EM::EMManager::removeObject
void removeObject(const EMObject *)
EM::EMManager::burstAlertToAll
void burstAlertToAll(bool yn)
multiid.h
EM::EMManager::undo
Undo & undo()
EM::EMManager::displayparameterstr
static const char * displayparameterstr()
EM::EMManager::objectLoader
Executor * objectLoader(const TypeSet< MultiID > &, const SurfaceIODataSelection *=0, TypeSet< MultiID > *idstobeloaded=0)
EM::SurfaceIODataSelection
Surface I/O data selection.
Definition: emsurfaceiodata.h:62
ptrman.h
mStruct
#define mStruct(module)
Definition: commondefs.h:182
Executor
Specification to enable chunkwise execution of a process.
Definition: executor.h:39
IOObjContext
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62
TaskRunner
Class that can execute a task.
Definition: task.h:170
Notifier
Class to help setup a callback handling.
Definition: notify.h:126
IOObj
Definition: ioobj.h:58
EM::EMManager::getMultiID
MultiID getMultiID(const ObjectID &) const
EM::EMManager::undolist_
ObjectSet< EMObjUndo > undolist_
Definition: emmanager.h:101
EM::EMManager::getObject
const EMObject * getObject(const ObjectID &) const
EM::EMManager::getObjectID
ObjectID getObjectID(const MultiID &) const
EM::EMManager::objects_
ObjectSet< EMObject > objects_
Definition: emmanager.h:108
EM::EMManager::objectID
EM::ObjectID objectID(int idx) const
MultiID
Compound key consisting of ints.
Definition: multiid.h:24
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
EM::EMManager::createObject
EM::ObjectID createObject(const char *type, const char *name)
EM::EMManager::addObject
void addObject(EMObject *)
EM::EMManager::undo
const Undo & undo() const
EM::EMManager::getObject
EMObject * getObject(const ObjectID &)
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
EM::ObjectID
od_int32 ObjectID
Definition: emposid.h:23
EM::EMManager::getSurfaceData
bool getSurfaceData(const MultiID &, SurfaceIOData &, uiString &errmsg) const
EM::EMManager
Manages the loaded/half loaded EM objects in OpendTect.
Definition: emmanager.h:46
EM::EMManager::undoIndexOf
int undoIndexOf(const EM::ObjectID &id)
EM::EMManager::size
int size() const
Definition: emmanager.h:52
emundo.h
EM::EMManager::readParsFromDisplayInfoFile
bool readParsFromDisplayInfoFile(const MultiID &, IOPar &) const
EM::EMObject
Base class for all EarthModel objects.
Definition: emobject.h:159
EM::EMManager::setEmpty
void setEmpty()
EM::EMManager::levelToBeRemoved
void levelToBeRemoved(CallBacker *)
uiEMPartServer
Earth Model UI Part Server.
Definition: uiempartserv.h:57
ranges.h
sets.h
EM::EMManager::undo_
Undo & undo_
Definition: emmanager.h:105
EM::EMManager::objectType
const char * objectType(const MultiID &) const
IOPar
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:55
EM::EMManager::undo
Undo & undo(const EM::ObjectID &)
EM::EMManager::objectLoader
Executor * objectLoader(const MultiID &, const SurfaceIODataSelection *=0)
TypeSet< MultiID >
Undo
Class to handle undo/redo information.
Definition: undo.h:42

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