repo.or.cz
/
ozulis.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
generating native executable
[ozulis.git]
/
src
/
core
/
id.hxx
blob
847cfbfb8dcb73c7f0eb269a0ed25d469ef80016
1
namespace
core
2
{
3
template
<
typename H
>
4
id_t
5
IdBase
<
H
>::
nextId
()
6
{
7
static
id_t nextId_
=
0
;
8
9
return
nextId_
++;
10
}
11
12
template
<
typename H
,
typename T
>
13
id_t
14
Id
<
H
,
T
>::
id
()
15
{
16
static
id_t id_
= -
1
;
17
18
if
(
id_
== -
1
)
19
id_
=
IdBase
<
H
>::
nextId
();
20
return
id_
;
21
}
22
}