Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
synch
CEvent.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
#ifndef mrpt_synch_event_H
29
#define mrpt_synch_event_H
30
31
#include <
mrpt/utils/utils_defs.h
>
32
#include <
mrpt/utils/CStream.h
>
33
#include <
mrpt/utils/CReferencedMemBlock.h
>
34
35
/*---------------------------------------------------------------
36
Class
37
---------------------------------------------------------------*/
38
namespace
mrpt
39
{
40
namespace
synch
41
{
42
/** This class provides a simple way of waiting for and signaling events (NOT IMPLEMENTED YET!).
43
* \ingroup synch_grp
44
*/
45
class
BASE_IMPEXP
CEvent
46
{
47
private
:
48
utils::CReferencedMemBlock
m_data
;
49
50
public
:
51
/** Constructor: set the initial signaled state of the event.
52
*/
53
CEvent
(
bool
initialSignaled );
54
55
/** Destructor
56
*/
57
~
CEvent
();
58
59
/** Signal the event: the first waiting thread resumes execution (if no thread is waiting, the object keeps signaled)
60
*/
61
void
signal();
62
63
/** Waits for the event to be signaled.
64
*/
65
void
wait();
66
67
/** Manual reset of the event, without waiting to a signaled state (without effect if it is currently not signaled)
68
*/
69
void
reset();
70
};
71
72
}
// End of namespace
73
74
}
// End of namespace
75
76
#endif
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013