Last change
on this file since 219 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 |
|
---|
18 | class Mutex_impl;
|
---|
19 | class ConditionVariable_impl;
|
---|
20 |
|
---|
21 | namespace flair {
|
---|
22 | namespace core {
|
---|
23 |
|
---|
24 | /*! \class Mutex
|
---|
25 | *
|
---|
26 | * \brief Class defining a mutex
|
---|
27 | *
|
---|
28 | */
|
---|
29 | class Mutex : public Object {
|
---|
30 | friend class ::ConditionVariable_impl;
|
---|
31 |
|
---|
32 | public:
|
---|
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 |
|
---|
65 | private:
|
---|
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.