Async
0.18.0
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
include
AsyncTimer.h
Go to the documentation of this file.
1
37
#ifndef ASYNC_TIMER_INCLUDED
38
#define ASYNC_TIMER_INCLUDED
39
40
41
/****************************************************************************
42
*
43
* System Includes
44
*
45
****************************************************************************/
46
47
#include <sigc++/sigc++.h>
48
49
50
51
/****************************************************************************
52
*
53
* Project Includes
54
*
55
****************************************************************************/
56
57
58
59
/****************************************************************************
60
*
61
* Local Includes
62
*
63
****************************************************************************/
64
65
66
67
/****************************************************************************
68
*
69
* Forward declarations
70
*
71
****************************************************************************/
72
73
74
75
/****************************************************************************
76
*
77
* Namespace
78
*
79
****************************************************************************/
80
81
namespace
Async
82
{
83
84
/****************************************************************************
85
*
86
* Defines & typedefs
87
*
88
****************************************************************************/
89
90
91
92
/****************************************************************************
93
*
94
* Exported Global Variables
95
*
96
****************************************************************************/
97
98
99
100
/****************************************************************************
101
*
102
* Class definitions
103
*
104
****************************************************************************/
105
116
class
Timer
:
public
SigC::Object
117
{
118
public
:
122
typedef
enum
123
{
124
TYPE_ONESHOT
,
125
TYPE_PERIODIC
126
}
Type
;
127
138
Timer
(
int
timeout_ms = 0,
Type
type
=
TYPE_ONESHOT
);
139
143
~Timer
(
void
);
144
149
Type
type
(
void
)
const
{
return
m_type; }
150
160
void
setTimeout
(
int
timeout_ms);
161
166
int
timeout
(
void
)
const
{
return
m_timeout_ms; }
167
173
void
setEnable
(
bool
do_enable);
174
180
bool
isEnabled
(
void
)
const
{
return
m_is_enabled; }
181
190
void
reset
(
void
);
191
200
SigC::Signal1<void, Timer *>
expired
;
201
202
203
protected
:
204
205
private
:
206
Type
m_type;
207
int
m_timeout_ms;
208
bool
m_is_enabled;
209
210
};
/* class Timer */
211
212
213
}
/* namespace */
214
215
#endif
/* ASYNC_TIMER_INCLUDED */
216
217
218
219
/*
220
* This file has not been truncated
221
*/
222
Generated by
1.8.4