EHS
Type.h
Go to the documentation of this file.
1#pragma once
2
3#include "Types.h"
4#include "Util.h"
5
6namespace ehs
7{
8 class EHS_LIB_IO Type
9 {
10 private:
11 friend class BaseObj;
12
13 UInt_64 size;
14 const Char_8* id;
15 UInt_64 hashId;
16
17 public:
18 Type();
19
22 explicit Type(const Char_8* id);
23
24 Type(Type&& type) noexcept;
25
26 Type(const Type& type);
27
28 Type& operator=(Type&& type) noexcept;
29
30 Type& operator=(const Type& type);
31
32 bool operator==(const Type& type) const;
33
34 bool operator!=(const Type& type) const;
35
36 bool operator==(UInt_64 inHashId) const;
37
38 bool operator!=(UInt_64 inHashId) const;
39
40 bool operator==(const Char_8* inStr) const;
41
42 bool operator!=(const Char_8* inStr) const;
43
46 UInt_64 GetSize() const;
47
50 const Char_8* GetId() const;
51
54 UInt_64 GetHashId() const;
55
58 bool IsValid() const;
59
60 private:
61 static UInt_64 CalcSize(const Char_8* id);
62
63 static UInt_64 GenHash(const Char_8* id, UInt_64 size);
64 };
65}
bool operator!=(const T *const first, const ehs::Str< T, N > &second)
Definition: Str.h:1967
bool operator==(const T *const first, const ehs::Str< T, N > &second)
Definition: Str.h:1957
Definition: BaseObj.h:9
Definition: Type.h:9
Definition: Anchor.h:6
char Char_8
Definition: Types.h:40