00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _QORE_AUTOVLOCK_H
00024
00025 #define _QORE_AUTOVLOCK_H
00026
00027 class AbstractSmartLock;
00028
00030
00032 class AutoVLock
00033 {
00034 private:
00035
00036 QoreThreadLock *m;
00037
00038
00039 QoreObject *o;
00040
00041
00042 ExceptionSink *xsink;
00043
00045 struct qore_avl_private *priv;
00046
00048 DLLLOCAL AutoVLock(const AutoVLock&);
00050 DLLLOCAL AutoVLock& operator=(const AutoVLock&);
00052 DLLLOCAL void *operator new(size_t);
00053
00054 public:
00056
00058 DLLEXPORT AutoVLock(ExceptionSink *n_xsink);
00059
00061 DLLEXPORT ~AutoVLock();
00062
00064 DLLEXPORT void del();
00065
00067 DLLLOCAL void set(QoreThreadLock *n_m);
00068
00070 DLLLOCAL void set(QoreObject *n_o, QoreThreadLock *n_m);
00071
00073 DLLLOCAL QoreThreadLock *get();
00074
00076
00079 DLLLOCAL void addMemberNotification(QoreObject *o, const char *member);
00080 };
00081
00082 #endif