src
Main Page
Namespaces
Classes
Files
File List
File Members
util
counter.h
Go to the documentation of this file.
1
#ifndef _RE2C_UTIL_COUNTER_
2
#define _RE2C_UTIL_COUNTER_
3
4
namespace
re2c
{
5
6
template
<
typename
num_t>
7
class
counter_t
8
{
9
num_t num;
10
11
public
:
12
counter_t
()
13
: num ()
14
{}
15
num_t
next
()
16
{
17
num_t n = num;
18
num.inc ();
19
return
n;
20
}
21
void
reset
()
22
{
23
num = num_t ();
24
}
25
};
26
27
}
// namespace re2c
28
29
#endif // _RE2C_UTIL_COUNTER_
re2c::counter_t::next
num_t next()
Definition:
counter.h:15
re2c::counter_t::reset
void reset()
Definition:
counter.h:21
re2c::counter_t::counter_t
counter_t()
Definition:
counter.h:12
re2c
Definition:
bitmap.cc:10
Generated by
1.8.10