Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raoulkdev/MiniECS/llms.txt
Use this file to discover all available pages before exploring further.
MiniECS::ModuleType is a scoped enum (enum class) that identifies module types throughout the framework. It is used by Unit::addModule() and Unit::removeModule() to specify which Module to create or destroy, and internally by Module::getType() for duplicate prevention and type-based lookup. Because it is a scoped enum, all values must be fully qualified with the enum name.
Header
Enum Definition
Values
| Value | Integer | Concrete Class | Description |
|---|---|---|---|
ModuleType::ModuleBase | 0 | Module | Base type. Not normally used directly as a component; serves as the identity for the abstract base class. |
ModuleType::Transform | 1 | TransformModule | 2D position, rotation, and scale. Requires GLM. |
ModuleType::Renderer | 2 | RendererModule | Rendering lifecycle hook; prints a start message each frame. |
Usage
Qualified enum values are passed toUnit::addModule() and Unit::removeModule():
Module constructor uses ModuleType to resolve the human-readable name returned by getTypeName(), and the enum value itself is accessible at any time via getType():
Because
ModuleType is an enum class, values are not implicitly convertible to or from integers. You must always use the fully qualified form MiniECS::ModuleType::Transform, not a bare 1.Adding a Custom Module Type
To extend the framework with a new Module type, follow these steps: 1. Add a value to the enum inModule.h:
Module:
Unit::addModule()’s switch statement in Unit.cpp:
Module constructor’s switch statement in Module.cpp: