OpendTect-6_4  6.4
visdataman.h
Go to the documentation of this file.
1 #ifndef visdataman_h
2 #define visdataman_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "sets.h"
18 #include "factory.h"
19 #include "callback.h"
20 #include <typeinfo>
21 namespace osg { class Node; }
22 
23 namespace visBase
24 {
25 class DataObject;
26 class SelectionManager;
27 
31 {
32 public:
33  DataManager();
34  virtual ~DataManager();
35 
36  const char* errMsg() const;
37 
38  void getIDs(const std::type_info&,TypeSet<int>&) const;
39  int highestID() const;
40 
41  DataObject* getObject(int id);
42  const DataObject* getObject(int id) const;
43  int getID(const osg::Node*) const;
45 
46  int nrObjects() const;
47  DataObject* getIndexedObject(int idx);
48  const DataObject* getIndexedObject(int idx) const;
49 
50  SelectionManager& selMan() { return selman_; }
51 
52  void fillPar(IOPar&) const;
53  //Only saves freeid_
54  bool usePar(const IOPar&);
55  //Only restores freeid_
56 
58 
60 protected:
61 
62  friend class DataObject;
63  void addObject( DataObject* );
64  void removeObject( DataObject* );
65 
67 
68  int freeid_;
71 
72  static const char* sKeyFreeID();
73  static const char* sKeySelManPrefix();
74 };
75 
77 
78 };
79 
80 
81 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
DataManager & DM()
#define mGlobal(module)
Definition: commondefs.h:163
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
Notifier< DataManager > removeallnotify
Definition: visdataman.h:57
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
Definition: visdataman.h:30
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
ObjectSet< DataObject > objects_
Definition: visdataman.h:66
SelectionManager handles DataObject that can be selected. If an object can be selected, it has to register himself with regSelObject. At registration it has to give two objects, first of all, he gives the object that outside users will associate him with when they want to add their CB to detect his selection.
Definition: visselman.h:44
int freeid_
Definition: visdataman.h:68
SelectionManager & selMan()
Definition: visdataman.h:50
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Open Scene Graph.
Definition: visannot.h:29
const char * errMsg() const
Definition: horizontracker.h:61
BufferString errmsg_
Definition: visdataman.h:70
SelectionManager & selman_
Definition: visdataman.h:69

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