#pragma once #include "Types.h" #include "Util.h" namespace ehs { class Type { private: friend class BaseObj; UInt_64 size; const Char_8* id; UInt_64 hashId; public: Type(); explicit Type(const Char_8* id); Type(Type&& type) noexcept = default; Type(const Type& type) = default; Type& operator=(Type&& type) noexcept = default; Type& operator=(const Type& type) = default; bool operator==(const Type& type) const; bool operator!=(const Type& type) const; bool operator==(UInt_64 inHashId) const; bool operator!=(UInt_64 inHashId) const; bool operator==(const Char_8* inStr) const; bool operator!=(const Char_8* inStr) const; UInt_64 GetSize() const; const Char_8* GetId() const; UInt_64 GetHashId() const; bool IsValid() const; private: static UInt_64 CalcSize(const Char_8* id); static UInt_64 GenHash(const Char_8* id, UInt_64 size); }; }