Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

HMutexOOC.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #pragma once
11 
12 
13 #ifdef H_PACK_8
14 # pragma pack(push)
15 # pragma pack(8)
16 #endif
17 
18 
20 
21 
24 class HMutexOOC {
25 public:
28  class LockGuard {
29  public:
33  LockGuard (HMutexOOC & mutex)
34  : mutex(mutex)
35  {
36  mutex.Lock();
37  }
38 
42  {
43  mutex.Unlock();
44  }
45 
46  private:
47  LockGuard (LockGuard &&); // disable
48  LockGuard (LockGuard const &); // disable
49  void operator= (LockGuard &&); // disable
50  void operator= (LockGuard const &); // disable
51 
52  private:
53  HMutexOOC & mutex;
54  };
55 
56 public:
59  HMutexOOC ();
60 
61  ~HMutexOOC ();
62 
65  void Lock ();
66 
69  void Unlock ();
70 
71 private:
72  void * opaque_mutex;
73 };
74 
75 
76 
77 
78 
79 
80 
81 
Definition: HMutexOOC.h:24
~LockGuard()
Definition: HMutexOOC.h:41
LockGuard(HMutexOOC &mutex)
Definition: HMutexOOC.h:33
Definition: HMutexOOC.h:28
void Unlock()
void Lock()