OpendTect  6.3
displaypropertylinks.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: K. Tingdahl & N. Hemstra
8  Date: September 2008
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "generalmod.h"
14 #include "factory.h"
15 #include "namedobj.h"
16 #include "threadlock.h"
17 
20 
45 {
46 public:
48  ~DisplayLinkManager();
49  static DisplayLinkManager& getImpl();
50 
51  int nrHolders() const;
53  const DisplayPropertyHolder* getHolder(int) const;
54 
55  void createPossibleLinks(DisplayPropertyHolder*,
58 
59  int nrDisplayPropertyLinks() const;
60  int getDisplayPropertyLinkID(int idx) const;
61  int addDisplayPropertyLink(DisplayPropertyLink*);
64  void removeDisplayPropertyLink(int id);
65  DisplayPropertyLink* getDisplayPropertyLink(int id);
66  const DisplayPropertyLink* getDisplayPropertyLink(int id) const;
67 
68  bool usePar(const IOPar&);
69  void fillPar(IOPar&) const;
70 
71 protected:
72 
73  friend class DisplayPropertyHolder;
74  void removeHolder(DisplayPropertyHolder*);
75 
79 
83 };
84 
85 
86 
87 
88 
90 {
91 public:
92  DisplayPropertyHolder(bool reg);
93 
94  virtual ~DisplayPropertyHolder();
95 
96  int propertyHolderID() const;
97  virtual const char* getDisplayPropertyHolderName() const;
98 
99 private:
100  friend class DisplayLinkManager;
102 
103 };
104 
105 
107 {
108 public:
111 
112  virtual const char* type() const = 0;
113  virtual const char* userType() const;
114 
115  virtual bool init();
116  //Called when added to manager, before
117  //this call, no callbacks should be set.
118 
121  bool isValid() const;
122  virtual void getDescription(BufferString&) const;
123 
124  int nrDisplayPropertyHolders() const;
125  const DisplayPropertyHolder* getDisplayPropertyHolder(int idx) const;
126 
127 protected:
128  friend class DisplayLinkManager;
129  virtual bool syncNow(const DisplayPropertyHolder* origin,
130  DisplayPropertyHolder* target);
131  //If Target is zero, sync all but origin
132 
133  virtual bool isHolderOK(const DisplayPropertyHolder*);
136 
138 };
#define mExpClass(module)
Definition: commondefs.h:157
int freelinkid_
Definition: displaypropertylinks.h:82
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:51
Definition: displaypropertylinks.h:44
Threads::Lock lock_
Definition: displaypropertylinks.h:78
int propertyHolderID() const
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
bool init()
int propertyholderid_
Definition: displaypropertylinks.h:101
int freeholderid_
Definition: displaypropertylinks.h:77
#define mDefineFactory1ParamInClass(T, P, funcname)
Definition: factory.h:445
ObjectSet< DisplayPropertyLink > propertylinks_
Definition: displaypropertylinks.h:80
TypeSet< int > propertylinkids_
Definition: displaypropertylinks.h:81
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
void removeHolder(DisplayPropertyHolder *)
Definition: displaypropertylinks.h:89
ObjectSet< DisplayPropertyHolder > holders_
Definition: displaypropertylinks.h:76
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
object with a name.
Definition: namedobj.h:20
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. 2017