RWLock.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
28 #ifndef ICL_CORE_THREAD_RWLOCK_H_INCLUDED
29 #define ICL_CORE_THREAD_RWLOCK_H_INCLUDED
30 
31 #include "icl_core/Noncopyable.h"
32 #include "icl_core/TimeSpan.h"
33 #include "icl_core/TimeStamp.h"
35 
36 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
37 # include "icl_core/Deprecate.h"
38 #endif
39 
40 namespace icl_core {
41 namespace thread {
42 
43 class RWLockImpl;
44 
48 {
49 public:
52  RWLock();
53 
56  virtual ~RWLock();
57 
62  bool readLock();
63 
68  bool readLock(const ::icl_core::TimeStamp& timeout);
69 
74  bool readLock(const ::icl_core::TimeSpan& timeout);
75 
82  bool tryReadLock();
83 
88  bool writeLock();
89 
94  bool writeLock(const ::icl_core::TimeStamp& timeout);
95 
100  bool writeLock(const ::icl_core::TimeSpan& timeout);
101 
108  bool tryWriteLock();
109 
112  void unlock();
113 
115 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
116 
121 
126  ICL_CORE_VC_DEPRECATE_STYLE bool ReadLock(const icl_core::TimeStamp& timeout)
128 
133  ICL_CORE_VC_DEPRECATE_STYLE bool ReadLock(const icl_core::TimeSpan& timeout)
135 
140 
145 
150  ICL_CORE_VC_DEPRECATE_STYLE bool WriteLock(const icl_core::TimeStamp& timeout)
152 
157  ICL_CORE_VC_DEPRECATE_STYLE bool WriteLock(const icl_core::TimeSpan& timeout)
159 
164 
169 
170 #endif
171 
173 private:
175 };
176 
177 }
178 }
179 
180 #endif
Represents absolute times.
Definition: TimeStamp.h:61
#define ICL_CORE_VC_DEPRECATE_STYLE
Definition: Deprecate.h:53
RWLockImpl * m_impl
Definition: RWLock.h:174
Contains macros to deprecate classes, types, functions and variables.
Contains import/export definitions for the Win32 plattform.
#define ICL_CORE_THREAD_IMPORT_EXPORT
const TimeSpan timeout(1, 0)
Repesents absolute times.
Definition: TimeSpan.h:46
Contains TimeStamp.
Contains icl_core::Noncopyable.
#define ICL_CORE_GCC_DEPRECATE_STYLE
Definition: Deprecate.h:54


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58