Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
Helpers
IIdentity.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "Types.h"
6
7
namespace
Eegeo
8
{
9
namespace
Helpers
10
{
11
typedef
int
TIdentity;
12
13
class
IIdentity
14
{
15
public
:
16
virtual
~
IIdentity
() {}
17
18
virtual
TIdentity GetIdentity()
const
= 0;
19
};
20
21
class
IIdentityProvider
22
{
23
public
:
24
virtual
~
IIdentityProvider
() {}
25
26
virtual
TIdentity GetNextIdentity() = 0;
27
};
28
29
class
IdentityProvider
:
public
IIdentityProvider
,
private
Eegeo::NonCopyable
30
{
31
TIdentity m_current;
32
public
:
33
IdentityProvider
() :m_current(0) { }
34
35
TIdentity GetNextIdentity() {
return
m_current ++; }
36
};
37
38
inline
bool
operator==(
const
IIdentity
& lhs,
const
IIdentity
& rhs){
return
lhs.GetIdentity() == rhs.GetIdentity(); }
39
40
inline
bool
operator!=(
const
IIdentity& lhs,
const
IIdentity& rhs){
return
!operator==(lhs,rhs);}
41
}
42
}
Generated on Sat Jun 10 2023 02:00:30 for eeGeo Platform SDK by
1.8.3.1