/
COLLADAFWUniqueId.cpp
73 lines (57 loc) · 1.72 KB
/
COLLADAFWUniqueId.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
Copyright (c) 2008 NetAllied Systems GmbH
This file is part of COLLADAFramework.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#include "COLLADAFWStableHeaders.h"
#include "COLLADAFWUniqueId.h"
namespace COLLADAFW
{
const UniqueId UniqueId::INVALID = UniqueId();
//-------------------------------
UniqueId::~UniqueId()
{
}
//-------------------------------
bool UniqueId::operator<( const UniqueId& rhs ) const
{
if ( mClassId < rhs.mClassId )
return true;
if ( mClassId > rhs.mClassId )
return false;
if ( mObjectId < rhs.mObjectId )
return true;
if ( mObjectId > rhs.mObjectId )
return false;
return false;
}
//-------------------------------
bool UniqueId::operator>( const UniqueId& rhs ) const
{
if ( mClassId > rhs.mClassId )
return true;
if ( mClassId < rhs.mClassId )
return false;
if ( mObjectId > rhs.mObjectId )
return true;
if ( mObjectId < rhs.mObjectId )
return false;
return false;
}
//-------------------------------
bool UniqueId::operator== ( const UniqueId& uid ) const
{
if ( mClassId != uid.getClassId () ) return false;
if ( mObjectId != uid.getObjectId () ) return false;
return true;
}
//-------------------------------
bool UniqueId::operator!= ( const UniqueId& uid ) const
{
if ( mClassId != uid.getClassId () ) return true;
if ( mObjectId != uid.getObjectId () ) return true;
return false;
}
} // namespace COLLADAFW