![]() |
Consolix
|
Component responsible for displaying a customizable ASCII logo. More...
#include <LogoComponent.hpp>
Public Member Functions | |
LogoComponent (TextColor color=TextColor::DarkYellow) | |
Constructs a LogoComponent with a default logo and color. | |
LogoComponent (const std::string &logo, TextColor color=TextColor::DarkYellow) | |
Constructs a LogoComponent with a custom logo and color. | |
virtual | ~LogoComponent ()=default |
Virtual destructor. | |
void | set_logo (const std::string &logo, TextColor color) |
Sets a custom logo and color. | |
bool | initialize () override |
Initializes the component and displays the logo. | |
bool | is_initialized () const override |
Checks if the component has been initialized. | |
void | process () override |
Executes the component (no operation for LogoComponent). | |
![]() | |
virtual | ~IAppComponent ()=default |
Virtual destructor for polymorphic usage. | |
Private Member Functions | |
void | set_console_color () |
Sets the console color before displaying the logo. | |
void | reset_console_color () |
Resets the console color to the default. | |
Private Attributes | |
std::string | m_logo |
The ASCII logo text to display. | |
TextColor | m_color |
The color of the logo. | |
std::atomic< bool > | m_is_init {false} |
Indicates whether the component is initialized. | |
Component responsible for displaying a customizable ASCII logo.
This component allows for displaying an ASCII logo with optional color customization. It supports direct console output or integration with LogIt for styled logging.
Definition at line 24 of file LogoComponent.hpp.
|
inline |
Constructs a LogoComponent
with a default logo and color.
color | The color to use for the logo (default: DarkYellow). |
Definition at line 28 of file LogoComponent.hpp.
|
inline |
Constructs a LogoComponent
with a custom logo and color.
logo | The ASCII logo to display. |
color | The color to use for the logo (default: DarkYellow). |
Definition at line 90 of file LogoComponent.hpp.
|
virtualdefault |
Virtual destructor.
|
inlineoverridevirtual |
Initializes the component and displays the logo.
true
if initialization succeeds, false
otherwise. Implements consolix::IAppComponent.
Definition at line 109 of file LogoComponent.hpp.
|
inlineoverridevirtual |
Checks if the component has been initialized.
true
if the component is initialized, false
otherwise. Implements consolix::IAppComponent.
Definition at line 129 of file LogoComponent.hpp.
|
inlineoverridevirtual |
Executes the component (no operation for LogoComponent).
Implements consolix::IAppComponent.
Definition at line 134 of file LogoComponent.hpp.
|
inlineprivate |
Resets the console color to the default.
Definition at line 154 of file LogoComponent.hpp.
|
inlineprivate |
Sets the console color before displaying the logo.
Definition at line 142 of file LogoComponent.hpp.
|
inline |
Sets a custom logo and color.
logo | The custom ASCII logo as a string. |
color | The color to display the logo in. |
Definition at line 102 of file LogoComponent.hpp.
|
private |
The color of the logo.
Definition at line 138 of file LogoComponent.hpp.
|
private |
Indicates whether the component is initialized.
Definition at line 139 of file LogoComponent.hpp.
|
private |
The ASCII logo text to display.
Definition at line 137 of file LogoComponent.hpp.