Flecs: Modules
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Modules
C++ API » Addons

Modules organize components, systems and more in reusable units of code. More...

Collaboration diagram for Modules:

template<typename Module>
flecs::entity | flecs::world::module (const char *name=nullptr) const
| Define a module.
template<typename Module>
flecs::entity | import ()
| Import a module.

## Detailed Description

Modules organize components, systems and more in reusable units of code.

## Function Documentation

## ◆ import()

template<typename Module>

flecs::entity flecs::world::import | ( |  | ) |
| related

Import a module.

Template Parameters

  Module | module class.

Returns
  Module entity.

Definition at line 115 of file impl.hpp.

## ◆ module()

template<typename Module>

flecs::entity flecs::world::module | ( | const char * | name = nullptr | ) | const
| inline

Define a module.

This operation is not mandatory, but can be called inside the module ctor to obtain the entity associated with the module, or override the module name.

Template Parameters

  Module | module class.

Returns
  Module entity.

Definition at line 82 of file impl.hpp.