![]() |
Consolix
|
Interface for defining application components. More...
#include <IAppComponent.hpp>
Public Member Functions | |
| virtual | ~IAppComponent ()=default |
| Virtual destructor for polymorphic usage. | |
Protected Member Functions | |
| virtual bool | initialize ()=0 |
| Initializes the component. This method is called once before the component is processed. | |
| virtual bool | is_initialized () const =0 |
| Checks if the component is initialized. Used to verify if the component is ready to be executed. | |
| virtual void | process ()=0 |
| Executes the component's main logic. Called repeatedly during the application's main execution loop. | |
Friends | |
| class | AppComponentManager |
Grants access to AppComponentManager. | |
Interface for defining application components.
Provides the foundational structure for application components with a defined lifecycle:
initialize(): One-time setup before execution.process(): Repeated execution during the main loop.is_initialized(): Verifies if the component is ready for execution.Access to lifecycle methods is restricted to the AppComponentManager class to ensure controlled execution.
Definition at line 19 of file IAppComponent.hpp.
|
virtualdefault |
Virtual destructor for polymorphic usage.
|
protectedpure virtual |
Initializes the component. This method is called once before the component is processed.
true if the initialization is successful, false otherwise. Implemented in consolix::BaseLoopComponent, consolix::LoggerComponent, consolix::LogoComponent, consolix::LoopComponent, and consolix::TitleComponent.
|
protectedpure virtual |
Checks if the component is initialized. Used to verify if the component is ready to be executed.
true if the component is initialized, false otherwise. Implemented in consolix::BaseLoopComponent, consolix::LoggerComponent, consolix::LogoComponent, consolix::LoopComponent, and consolix::TitleComponent.
|
protectedpure virtual |
Executes the component's main logic. Called repeatedly during the application's main execution loop.
Implemented in consolix::BaseLoopComponent, consolix::LoggerComponent, consolix::LogoComponent, and consolix::TitleComponent.
|
friend |
Grants access to AppComponentManager.
Definition at line 20 of file IAppComponent.hpp.