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

Interface for components supporting shutdown logic. More...

#include <IShutdownable.hpp>

Inheritance diagram for consolix::IShutdownable:
consolix::BaseLoopComponent consolix::LoopComponent CustomLoop

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~IShutdownable()

virtual consolix::IShutdownable::~IShutdownable ( )
virtualdefault

Virtual destructor for polymorphic use.

Member Function Documentation

◆ shutdown()

virtual void consolix::IShutdownable::shutdown ( int signal)
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.

Parameters
signalThe shutdown signal (e.g., SIGINT or SIGTERM).

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

Friends And Related Symbol Documentation

◆ AppComponentManager

friend class AppComponentManager
friend

Grants access to the AppComponentManager class.

Definition at line 18 of file IShutdownable.hpp.


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