Helios Engine 0.1.0
A modular ECS based data-oriented C++23 game engine
 
Loading...
Searching...
No Matches
helios::example::ExampleModule Struct Referencefinal

#include <example.hpp>

Inheritance diagram for helios::example::ExampleModule:
helios::app::Module

Public Member Functions

void Build (app::App &app) override
 Builds the module, adding resources and systems to the app.
 
void Destroy (app::App &app) override
 Destroys the module, performing cleanup.
 
- Public Member Functions inherited from helios::app::Module
virtual ~Module ()=default
 
virtual bool IsReady (const App &app) const noexcept
 Checks if the module is ready for finalization.
 
virtual void Finish (App &app)
 Finishes adding this module to the App, once all modules are ready.
 

Static Public Member Functions

static constexpr std::string_view GetName () noexcept
 Returns the name of the module.
 

Detailed Description

Member Function Documentation

◆ Build()

void helios::example::ExampleModule::Build ( app::App app)
overridevirtual

Builds the module, adding resources and systems to the app.

Parameters
appThe application to configure.

Implements helios::app::Module.

Examples
/home/runner/work/HeliosEngine/HeliosEngine/src/modules/example/include/helios/example/example.hpp.

Definition at line 13 of file example.cpp.

13 {
14 app.InsertResource(ExampleResource{});
15 app.AddSystem<ExampleSystem>(app::kUpdate);
16}
constexpr Update kUpdate

◆ Destroy()

void helios::example::ExampleModule::Destroy ( app::App app)
overridevirtual

Destroys the module, performing cleanup.

Parameters
appThe application to clean up.

Reimplemented from helios::app::Module.

Examples
/home/runner/work/HeliosEngine/HeliosEngine/src/modules/example/include/helios/example/example.hpp.

Definition at line 18 of file example.cpp.

18 {
19 /* No cleanup needed for this simple example */
20}

◆ GetName()

static constexpr std::string_view helios::example::ExampleModule::GetName ( )
inlinestaticconstexprnoexcept

Returns the name of the module.

Returns
Module name.
Examples
/home/runner/work/HeliosEngine/HeliosEngine/src/modules/example/include/helios/example/example.hpp.

Definition at line 74 of file example.hpp.

74{ return "Example"; }