source: flair-src/trunk/lib/FlairCore/src/Mutex.h@ 26

Last change on this file since 26 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 1.1 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Mutex.h
7 * \brief Class defining a mutex
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2012/03/14
10 * \version 4.0
11 */
12
13#ifndef MUTEX_H
14#define MUTEX_H
15
16#include <Object.h>
17
18class Mutex_impl;
19class ConditionVariable_impl;
20
21namespace flair {
22namespace core {
23
24/*! \class Mutex
25*
26* \brief Class defining a mutex
27*
28*/
29class Mutex : public Object {
30 friend class ::ConditionVariable_impl;
31
32public:
33 /*!
34 * \brief Constructor
35 *
36 * Construct a mutex.
37 *
38 * \param parent parent
39 * \param name name
40 */
41 Mutex(const Object *parent, std::string name = "");
42
43 /*!
44 * \brief Destructor
45 *
46 */
47 ~Mutex();
48
49 /*!
50 * \brief GetMutex
51 *
52 * Lock the mutex.
53 *
54 */
55 void GetMutex(void) const;
56
57 /*!
58 * \brief ReleaseMutex
59 *
60 * Unlock the mutex.
61 *
62 */
63 void ReleaseMutex(void) const;
64
65private:
66 class Mutex_impl *pimpl_;
67};
68
69} // end namespace core
70} // end namespace flair
71
72#endif // MUTEX_H
Note: See TracBrowser for help on using the repository browser.