Consolix
Loading...
Searching...
No Matches
consolix::IAppComponent Class Referenceabstract

Interface for defining application components. More...

#include <IAppComponent.hpp>

Inheritance diagram for consolix::IAppComponent:
consolix::BaseLoopComponent consolix::LogoComponent consolix::LoopComponent consolix::TitleComponent CustomLoop

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.
 

Detailed Description

Interface for defining application components.

Provides the foundational structure for application components with a defined lifecycle:

Access to lifecycle methods is restricted to the AppComponentManager class to ensure controlled execution.

Definition at line 19 of file IAppComponent.hpp.

Constructor & Destructor Documentation

◆ ~IAppComponent()

virtual consolix::IAppComponent::~IAppComponent ( )
virtualdefault

Virtual destructor for polymorphic usage.

Member Function Documentation

◆ initialize()

virtual bool consolix::IAppComponent::initialize ( )
protectedpure virtual

Initializes the component. This method is called once before the component is processed.

Returns
true if the initialization is successful, false otherwise.

Implemented in consolix::BaseLoopComponent, consolix::LogoComponent, consolix::LoopComponent, and consolix::TitleComponent.

◆ is_initialized()

virtual bool consolix::IAppComponent::is_initialized ( ) const
protectedpure virtual

Checks if the component is initialized. Used to verify if the component is ready to be executed.

Returns
true if the component is initialized, false otherwise.

Implemented in consolix::BaseLoopComponent, consolix::LogoComponent, consolix::LoopComponent, and consolix::TitleComponent.

◆ process()

virtual void consolix::IAppComponent::process ( )
protectedpure virtual

Executes the component's main logic. Called repeatedly during the application's main execution loop.

Implemented in consolix::BaseLoopComponent, consolix::LogoComponent, and consolix::TitleComponent.

Friends And Related Symbol Documentation

◆ AppComponentManager

friend class AppComponentManager
friend

Grants access to AppComponentManager.

Definition at line 20 of file IAppComponent.hpp.


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