Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
rendering_engine::SceneAutoRegistrar< TScene > Struct Template Reference

Template-based auto-registrar for scenes. More...

#include <scene_manager.hpp>

Public Member Functions

 SceneAutoRegistrar (const char *name)
 

Detailed Description

template<class TScene>
struct rendering_engine::SceneAutoRegistrar< TScene >

Template-based auto-registrar for scenes.

Registers a scene type automatically at static initialization time. Used internally by the REG_SCENE() macro.

Definition at line 150 of file scene_manager.hpp.

Constructor & Destructor Documentation

◆ SceneAutoRegistrar()

template<class TScene >
rendering_engine::SceneAutoRegistrar< TScene >::SceneAutoRegistrar ( const char *  name)
inlineexplicit

Definition at line 152 of file scene_manager.hpp.

153 {
155 list.emplace_back(
156 std::string{ name },
157 [](SceneManager& sm) {
158 return std::make_unique<TScene>(sm);
159 });
160 }
static std::vector< std::pair< std::string, Factory > > & GetPendingRegistrations()
Type alias for the factory used to create scenes.

The documentation for this struct was generated from the following file: