![]() |
Consolix
|
Interface for components supporting shutdown logic. More...
#include <IShutdownable.hpp>
Public Member Functions | |
virtual | ~IShutdownable ()=default |
Virtual destructor for polymorphic use. | |
Protected Member Functions | |
virtual void | shutdown (int signal)=0 |
Handles shutdown logic for the component. | |
Friends | |
class | AppComponentManager |
Grants access to the AppComponentManager class. | |
Interface for components supporting shutdown logic.
This interface defines a method for handling shutdown events, which is particularly useful for releasing resources, saving state, or performing cleanup operations when a termination signal is received. Access to the shutdown
method is restricted to the AppComponentManager
class.
Definition at line 17 of file IShutdownable.hpp.
|
virtualdefault |
Virtual destructor for polymorphic use.
|
protectedpure virtual |
Handles shutdown logic for the component.
This method is called when a shutdown signal is received. Derived components should implement this method to perform necessary cleanup or save state before termination.
signal | The shutdown signal (e.g., SIGINT or SIGTERM). |
Implemented in consolix::BaseLoopComponent, and consolix::LoopComponent.
|
friend |
Grants access to the AppComponentManager
class.
Definition at line 18 of file IShutdownable.hpp.