Skip to main content

Controller.ixx File

Base class for application controllers that integrate subsystems. More...

Included Headers

#include <string> #include <helios.event.Dispatcher>

Namespaces Index

namespacehelios
namespaceapp

Application infrastructure and lifecycle management. More...

namespacecontroller

Controller classes for application control flow. More...

Classes Index

classController

Abstract base class for application controllers. More...

Description

Base class for application controllers that integrate subsystems.

File Listing

The file content with the documentation metadata removed is:

1/**
2 * @file Controller.ixx
3 * @brief Base class for application controllers that integrate subsystems.
4 */
5module;
6
7#include <string>
8
9export module helios.app.controller.Controller;
10
11import helios.event.Dispatcher;
12
13export namespace helios::app::controller {
14 /**
15 * @brief Abstract base class for application controllers.
16 *
17 * Derived classes are expected to implement methods for event subscription/handling
18 * and optional initialization.
19 */
20 class Controller {
21 public:
22 virtual ~Controller() = default;
23
24 /**
25 * @brief Registers this controller with the specified Dispatcher.
26 *
27 * This method should be called whenever a controller is interested in abn event dispatched
28 * by the specified Dispatcher.
29 *
30 * @param dispatcher
31 */
32 virtual void subscribeTo(helios::event::Dispatcher& dispatcher) = 0;
33
34 /**
35 * @brief Initializes this controller.
36 *
37 * The initialization state is defined by deriving classes.
38 *
39 * @return bool true if the controller was successfully initialized and is
40 * in a valid state, otherwise false, signaling this controller should not be used further.
41 */
42 virtual bool init() = 0;
43
44 [[nodiscard]] virtual std::string toString() const noexcept = 0;
45 };
46
47
48} // namespace helios::app::controller

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.