refactor: improve thing types

Change thing_t enumeration to thing_type structure.

Closes: #30
This commit is contained in:
2026-06-29 20:36:42 +02:00
parent 8466902281
commit 6ab9254746
5 changed files with 121 additions and 105 deletions
+19 -2
View File
@@ -141,10 +141,27 @@ using mod_h = handle<mod, refcount_header<mod_id>>;
// thing.hpp
/**
* @enum thing_t
* @enum thing_type_t
* @brief Type of the thing's type.
*/
enum class thing_type_t : std::uint32_t;
/**
* @struct thing_type
* @brief Thing type.
*/
enum class thing_t : std::uint8_t;
struct thing_type;
/**
* @brief Thing type's identifier.
*/
using thing_type_id = std::uint32_t;
// TODO: Use generic header
/**
* @brief A handle to a thing type.
*/
using thing_type_h = handle<thing_type, refcount_header<thing_type_id>>;
/**
* @class bad_thing_access