forked from kovacsv/VisualScriptEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNUIE_IconId.cpp
More file actions
55 lines (41 loc) · 855 Bytes
/
Copy pathNUIE_IconId.cpp
File metadata and controls
55 lines (41 loc) · 855 Bytes
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
#include "NUIE_IconId.hpp"
namespace NUIE
{
SERIALIZATION_INFO (IconId, 1);
IconId::IconId (const IconIdType& id) :
id (id)
{
}
IconId::~IconId ()
{
}
IconIdType IconId::GetId () const
{
return id;
}
size_t IconId::GenerateHashValue () const
{
return std::hash<IconIdType> {} (id);
}
bool IconId::operator== (const IconId& rhs) const
{
return id == rhs.id;
}
bool IconId::operator!= (const IconId& rhs) const
{
return !operator== (rhs);
}
NE::Stream::Status IconId::Read (NE::InputStream& inputStream)
{
NE::ObjectHeader header (inputStream);
inputStream.Read (id);
return inputStream.GetStatus ();
}
NE::Stream::Status IconId::Write (NE::OutputStream& outputStream) const
{
NE::ObjectHeader header (outputStream, serializationInfo);
outputStream.Write (id);
return outputStream.GetStatus ();
}
const IconId InvalidIconId (-1);
}