OpendTect-6_4  6.4
displaypropertylinks.h
Go to the documentation of this file.
1 #ifndef displaypropertylinks_h
2 #define displaypropertylinks_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl & N. Hemstra
9  Date: September 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "factory.h"
17 #include "namedobj.h"
18 #include "threadlock.h"
19 
22 
47 {
48 public:
50  ~DisplayLinkManager();
51  static DisplayLinkManager& getImpl();
52 
53  int nrHolders() const;
55  const DisplayPropertyHolder* getHolder(int) const;
56 
57  void createPossibleLinks(DisplayPropertyHolder*,
60 
61  int nrDisplayPropertyLinks() const;
62  int getDisplayPropertyLinkID(int idx) const;
63  int addDisplayPropertyLink(DisplayPropertyLink*);
66  void removeDisplayPropertyLink(int id);
67  DisplayPropertyLink* getDisplayPropertyLink(int id);
68  const DisplayPropertyLink* getDisplayPropertyLink(int id) const;
69 
70  bool usePar(const IOPar&);
71  void fillPar(IOPar&) const;
72 
73 protected:
74 
75  friend class DisplayPropertyHolder;
76  void removeHolder(DisplayPropertyHolder*);
77 
81 
85 };
86 
87 
88 
89 
90 
92 {
93 public:
94  DisplayPropertyHolder(bool reg);
95 
96  virtual ~DisplayPropertyHolder();
97 
98  int propertyHolderID() const;
99  virtual const char* getDisplayPropertyHolderName() const;
100 
101 private:
102  friend class DisplayLinkManager;
104 
105 };
106 
107 
109 {
110 public:
113 
114  virtual const char* type() const = 0;
115  virtual const char* userType() const;
116 
117  virtual bool init();
118  //Called when added to manager, before
119  //this call, no callbacks should be set.
120 
123  bool isValid() const;
124  virtual void getDescription(BufferString&) const;
125 
126  int nrDisplayPropertyHolders() const;
127  const DisplayPropertyHolder* getDisplayPropertyHolder(int idx) const;
128 
129 protected:
130  friend class DisplayLinkManager;
131  virtual bool syncNow(const DisplayPropertyHolder* origin,
132  DisplayPropertyHolder* target);
133  //If Target is zero, sync all but origin
134 
135  virtual bool isHolderOK(const DisplayPropertyHolder*);
138 
140 };
141 
142 #endif
#define mExpClass(module)
Definition: commondefs.h:160
int freelinkid_
Definition: displaypropertylinks.h:84
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Definition: displaypropertylinks.h:46
Threads::Lock lock_
Definition: displaypropertylinks.h:80
int propertyHolderID() const
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
int propertyholderid_
Definition: displaypropertylinks.h:103
int freeholderid_
Definition: displaypropertylinks.h:79
#define mDefineFactory1ParamInClass(T, P, funcname)
Definition: factory.h:447
ObjectSet< DisplayPropertyLink > propertylinks_
Definition: displaypropertylinks.h:82
TypeSet< int > propertylinkids_
Definition: displaypropertylinks.h:83
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
void removeHolder(DisplayPropertyHolder *)
Definition: displaypropertylinks.h:91
ObjectSet< DisplayPropertyHolder > holders_
Definition: displaypropertylinks.h:78
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
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
int addHolder(DisplayPropertyHolder *)
virtual ~DisplayPropertyHolder()
DisplayPropertyHolder(bool reg)
virtual const char * getDisplayPropertyHolderName() const

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