ScopedSemaphore.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 //----------------------------------------------------------------------
28 //----------------------------------------------------------------------
29 #ifndef ICL_CORE_LOGGING_SCOPED_SEMAPHORE_H_INCLUDED
30 #define ICL_CORE_LOGGING_SCOPED_SEMAPHORE_H_INCLUDED
31 
32 #include <icl_core/BaseTypes.h>
33 #include <icl_core/Noncopyable.h>
35 
36 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
37 # include "icl_core/Deprecate.h"
38 #endif
39 
40 namespace icl_core {
41 namespace logging {
42 
43 class Semaphore;
44 
51 {
52 public:
54  explicit ScopedSemaphore(Semaphore& semaphore);
55 
57  ~ScopedSemaphore();
58 
60  bool isDecremented() const { return m_is_decremented; }
61 
63  operator bool () const { return isDecremented(); }
64 
66 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
67 
72 
73 #endif
74 
76 private:
79 };
80 
81 }
82 }
83 
84 #endif
#define ICL_CORE_VC_DEPRECATE_STYLE
Definition: Deprecate.h:53
Contains macros to deprecate classes, types, functions and variables.
Contains import/export definitions for the Win32 plattform.
Implements a platform independent mutex.
Definition: Semaphore.h:44
Manages locking and unlocking of a mutes.
Contains Interface base classes and base types.
bool isDecremented() const
Check if the semaphore has been successfully decremented.
Contains icl_core::Noncopyable.
#define ICL_CORE_LOGGING_IMPORT_EXPORT
#define ICL_CORE_GCC_DEPRECATE_STYLE
Definition: Deprecate.h:54


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