Consolix
Loading...
Searching...
No Matches
IAppComponent.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef _CONSOLIX_IAPPLICATION_COMPONENT_HPP_INCLUDED
3#define _CONSOLIX_IAPPLICATION_COMPONENT_HPP_INCLUDED
4
7
8namespace consolix {
9
20 friend class AppComponentManager;
21 public:
23 virtual ~IAppComponent() = default;
24
25 protected:
26
30 virtual bool initialize() = 0;
31
35 virtual bool is_initialized() const = 0;
36
39 virtual void process() = 0;
40
41 }; // IAppComponent
42
43}; // namespace consolix
44
45#endif // _CONSOLIX_IAPPLICATION_COMPONENT_HPP_INCLUDED
Interface for defining application components.
virtual bool initialize()=0
Initializes the component. This method is called once before the component is processed.
virtual void process()=0
Executes the component's main logic. Called repeatedly during the application's main execution loop.
virtual ~IAppComponent()=default
Virtual destructor for polymorphic usage.
friend class AppComponentManager
Grants access to AppComponentManager.
virtual bool is_initialized() const =0
Checks if the component is initialized. Used to verify if the component is ready to be executed.
< Utility modules and helpers.