00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _QORE_AUTOVLOCK_H
00025
00026 #define _QORE_AUTOVLOCK_H
00027
00028 class AbstractSmartLock;
00029
00031
00033 class AutoVLock
00034 {
00035 private:
00036
00037 QoreThreadLock *m;
00038
00039
00040 QoreObject *o;
00041
00042
00043 ExceptionSink *xsink;
00044
00046 struct qore_avl_private *priv;
00047
00049 DLLLOCAL AutoVLock(const AutoVLock&);
00051 DLLLOCAL AutoVLock& operator=(const AutoVLock&);
00053 DLLLOCAL void *operator new(size_t);
00054
00055 public:
00057
00059 DLLEXPORT AutoVLock(ExceptionSink *n_xsink);
00060
00062 DLLEXPORT ~AutoVLock();
00063
00065 DLLEXPORT void del();
00066
00068 DLLLOCAL void set(QoreThreadLock *n_m);
00069
00071 DLLLOCAL void set(QoreObject *n_o, QoreThreadLock *n_m);
00072
00074 DLLLOCAL QoreThreadLock *get();
00075
00077
00080 DLLLOCAL void addMemberNotification(QoreObject *o, const char *member);
00081 };
00082
00083 #endif