Adjusted workflow.
This commit is contained in:
65
include/ehs/Type.h
Normal file
65
include/ehs/Type.h
Normal 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);
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user