OpendTect  6.3
qptr.h
Go to the documentation of this file.
1 #ifndef qptr_h
2 #define qptr_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: Nov 2012
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "gendefs.h"
15 
16 class NotifierAccess;
17 class i_QPtrImpl;
18 namespace Threads { class Mutex; }
19 
20 mFDQtclass(QObject);
21 
27 class QObjPtr
28 {
29 public:
30  QObjPtr(mQtclass(QObject)* = 0);
31  ~QObjPtr();
32 
33  operator mQtclass(QObject)*();
34  operator const mQtclass(QObject)*() const;
35  mQtclass(QObject*) operator->();
36  const mQtclass(QObject*) operator->() const;
37 
38  mQtclass(QObject)* operator=(mQtclass(QObject)*);
39 
40  Threads::Mutex& mutex();
41 
42  NotifierAccess& deleteNotifier();
43 
44 protected:
45 
47 };
48 
49 
50 #endif
#define mQtclass(cls)
Definition: commondefs.h:232
Interface class for Notifier. See comments there.
Definition: notify.h:20
mFDQtclass(QObject)
Helper class for QPtr to relay Qt's messages. Internal object, to hide Qt's signal/slot mechanism...
Definition: i_qptr.h:24
interface to threads that should be portable.
Definition: atomic.h:24
Class with a pointer to a QObject. The pointer will be set to null when the QObject goes out of scope...
Definition: qptr.h:27
Is a lock that allows a thread to have exlusive rights to something.
Definition: thread.h:43
i_QPtrImpl * impl_
Definition: qptr.h:46

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