#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;

        Type(const Type& type);

		Type& operator=(Type&& type) noexcept;

        Type& operator=(const Type& type);

        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);
    };
}