matf-rg-engine  1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
engine::core::EngineControllersEnd Class Referencefinal

This controller does nothing and together with EngineControllersEnd it servers as a sentinel controller for marking the engine controllers. More...

#include <Controller.hpp>

Inheritance diagram for engine::core::EngineControllersEnd:
Inheritance graph
[legend]
Collaboration diagram for engine::core::EngineControllersEnd:
Collaboration graph
[legend]

Public Member Functions

std::string_view name () const override
 
- Public Member Functions inherited from engine::core::Controller
virtual ~Controller ()=default
 
void before (Controller *next)
 
void after (Controller *prev)
 
const std::vector< Controller * > & next () const
 
bool is_enabled () const
 Controller will execute as long this function returns true. More...
 
void set_enable (bool value)
 Enables or disables the controller based on value. The engine::core::App executes only the enabled controllers, except for the Controller::poll_events function, that's executed always. By default, controllers are enabled when registered. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from engine::core::Controller
template<typename TController >
static TController * get (std::source_location location=std::source_location::current())
 Serves as a single access point for all the Controller types throughout the code base. Make sure to register the controller via App::register_controller before calling this function. More...
 

Detailed Description

This controller does nothing and together with EngineControllersEnd it servers as a sentinel controller for marking the engine controllers.

This makes it easier for the concrete App implementation to order its custom controllers before/after engine controllers.

Here is an example of how to make the user_controller execute after all the engine controllers:

auto user_controller = ...;
user_controller->after(engine::core::Controller::get<EngineControllersEnd>());

Member Function Documentation

◆ name()

std::string_view engine::core::EngineControllersEnd::name ( ) const
inlineoverridevirtual

Returns the controller class name; used for logging.

Returns
Controller name

Reimplemented from engine::core::Controller.


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