Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Shapes
ShapeIdGenerator.h
1
#pragma once
2
3
#include "EegeoShapes.h"
4
#include "Types.h"
5
#include "IShapeModel.h"
6
7
namespace
Eegeo
8
{
9
namespace
Shapes
10
{
11
template
<
typename
TId>
12
class
TIdGeneratorBase
13
{
14
public
:
15
typedef
TId IdType;
16
17
virtual
~
TIdGeneratorBase
() {}
18
virtual
IdType GetNext() = 0;
19
};
20
21
22
template
<
typename
TBase>
23
class
TIdGenerator
:
public
TBase,
private
Eegeo::NonCopyable
24
{
25
public
:
26
TIdGenerator
()
27
: m_nextId(1)
28
{}
29
30
31
typename
TBase::IdType GetNext()
32
{
33
return
m_nextId++;
34
}
35
private
:
36
int
m_nextId;
37
};
38
39
40
class
IShapeIdGenerator
:
public
TIdGeneratorBase
<IShapeModel::IdType>
41
{
42
43
};
44
45
46
class
ShapeIdGenerator
:
public
TIdGenerator
<IShapeIdGenerator>
47
{
48
49
};
50
}
51
}
Generated on Sat Jun 10 2023 02:00:34 for eeGeo Platform SDK by
1.8.3.1