Adjusted workflow.
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s

This commit is contained in:
2024-02-05 22:25:30 -08:00
commit bcd71cf2b5
251 changed files with 45909 additions and 0 deletions

65
include/ehs/Type.h Normal file
View File

@@ -0,0 +1,65 @@
#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();
/// Constructs the object with the given class name.
/// @param [in] id The class name.
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;
/// Retrieves the name size.
/// @returns The size.
UInt_64 GetSize() const;
/// Retrieves the name.
/// @returns The name.
const Char_8* GetId() const;
/// Retrieves the hashed name.
/// @returns The hashed name.
UInt_64 GetHashId() const;
/// Whether or not this object was properly constructed.
/// @returns The result.
bool IsValid() const;
private:
static UInt_64 CalcSize(const Char_8* id);
static UInt_64 GenHash(const Char_8* id, UInt_64 size);
};
}