source: flair-dev/trunk/include/FlairCore/Mutex.h@ 2

Last change on this file since 2 was 2, checked in by Sanahuja Guillaume, 8 years ago

initial commit flaircore

File size: 1.4 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
22{
23namespace core
24{
25
26 /*! \class Mutex
27 *
28 * \brief Class defining a mutex
29 *
30 */
31 class Mutex: public Object
32 {
33 friend class ::ConditionVariable_impl;
34
35 public:
36 /*!
37 * \brief Constructor
38 *
39 * Construct a mutex.
40 *
41 * \param parent parent
42 * \param name name
43 */
44 Mutex(const Object *parent,std::string name="");
45
46 /*!
47 * \brief Destructor
48 *
49 */
50 ~Mutex();
51
52 /*!
53 * \brief GetMutex
54 *
55 * Lock the mutex.
56 *
57 */
58 void GetMutex(void) const;
59
60 /*!
61 * \brief ReleaseMutex
62 *
63 * Unlock the mutex.
64 *
65 */
66 void ReleaseMutex(void) const;
67
68 private:
69 class Mutex_impl* pimpl_;
70 };
71
72} // end namespace core
73} // end namespace flair
74
75#endif // MUTEX_H
Note: See TracBrowser for help on using the repository browser.