forked from kovacsv/VisualScriptEngineWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNE_SlotId.hpp
More file actions
50 lines (37 loc) · 787 Bytes
/
NE_SlotId.hpp
File metadata and controls
50 lines (37 loc) · 787 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
#ifndef NE_SLOTID_HPP
#define NE_SLOTID_HPP
#include "NE_Serializable.hpp"
#include <string>
namespace NE
{
class SlotId
{
SERIALIZABLE;
public:
SlotId ();
explicit SlotId (const std::string& id);
~SlotId ();
size_t GenerateHashValue () const;
bool operator< (const SlotId& rhs) const;
bool operator> (const SlotId& rhs) const;
bool operator== (const SlotId& rhs) const;
bool operator!= (const SlotId& rhs) const;
Stream::Status Read (InputStream& inputStream);
Stream::Status Write (OutputStream& outputStream) const;
private:
std::string id;
};
extern const SlotId NullSlotId;
}
namespace std
{
template <>
struct hash<NE::SlotId>
{
size_t operator() (const NE::SlotId& id) const noexcept
{
return id.GenerateHashValue ();
}
};
}
#endif