ConditionHelper.h
Go to the documentation of this file.
1 /*=============================================================================
2  Copyright (C) 2012 Allied Vision Technologies. All Rights Reserved.
3 
4  Redistribution of this file, in original or modified form, without
5  prior written consent of Allied Vision Technologies is prohibited.
6 
7 -------------------------------------------------------------------------------
8 
9  File: ConditionHelper.h
10 
11  Description: Definition of helper class for conditions.
12  (This include file is for internal use only.)
13 
14 -------------------------------------------------------------------------------
15 
16  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
17  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF TITLE,
18  NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 
27 =============================================================================*/
28 
29 #ifndef AVT_VMBAPI_CONDITIONHELPER_H
30 #define AVT_VMBAPI_CONDITIONHELPER_H
31 
33 
34 #include <map>
35 
36 namespace AVT {
37 namespace VmbAPI {
38 
40 {
41  public:
43 
44  // Waits until writing access has finished and returns true.
45  // If exclusive writing access was granted the function exits immediately without locking and returns false
46  bool EnterReadLock( BasicLockable &rLockable );
47  bool EnterReadLock( MutexPtr pMutex );
48  void ExitReadLock( BasicLockable &rLockable );
49  void ExitReadLock( MutexPtr pMutex );
50 
51  // Waits until writing and reading access have finished and returns true.
52  // If exclusive writing access was granted the function exits immediately without locking and returns false
53  bool EnterWriteLock( BasicLockable &rLockable, bool bExclusive = false );
54  bool EnterWriteLock( MutexPtr pMutex, bool bExclusive = false );
55  void ExitWriteLock( BasicLockable &rLockable );
56  void ExitWriteLock( MutexPtr pMutex );
57 
58  private:
64 };
65 
66 }} // namespace AVT::VmbAPI
67 
68 #endif // CONDITIONHELPER_H
bool EnterWriteLock(BasicLockable &rLockable, bool bExclusive=false)
void ExitWriteLock(BasicLockable &rLockable)
void ExitReadLock(BasicLockable &rLockable)
bool EnterReadLock(BasicLockable &rLockable)


avt_vimba_camera
Author(s): Miquel Massot , Allied Vision Technologies
autogenerated on Wed Jun 5 2019 22:22:40