Consolix
Loading...
Searching...
No Matches
Components

Core components of the Consolix framework. More...

Files

file  components.hpp
 Entry point for including all Consolix components.
 
file  BaseLoopComponent.hpp
 Provides a base class for implementing looping application components.
 
file  CliComponent.hpp
 Component for handling command-line arguments using cxxopts library.
 
file  ConfigComponent.hpp
 Component for loading and managing configuration data from JSON files.
 
file  LoggerComponent.hpp
 Logger component for managing application logging with LogIt.
 
file  LogoComponent.hpp
 Defines a component for displaying a customizable ASCII logo.
 
file  LoopComponent.hpp
 Defines a component for running a customizable execution loop.
 
file  TitleComponent.hpp
 Component for managing console window titles in a platform-independent way.
 

Detailed Description

Core components of the Consolix framework.

The Components group includes modules that provide functionality such as logging, command-line argument handling, configuration management, logo rendering, and structured execution loops.

Main Components:

Key Features:

Included Headers:

Example Usage:

#define CONSOLIX_USE_LOGIT 1
int main(int argc, char* argv[]) {
// Add logging functionality
// Display the application logo
// Handle command-line arguments
consolix::add<consolix::CliComponent>("MyApp", "Program description", [](auto& options) {
options.add_options()("debug", "Enable debug mode");
}, argc, argv);
// Load configuration from a JSON file
// Execute the main loop
CONSOLIX_STREAM() << "Executing main loop...";
});
}
#define CONSOLIX_STREAM()
Fallback for general logging.
Entry point for including all Consolix components.
std::shared_ptr< Component > add(Args &&... args)
Adds a new component to the application. Creates a new instance of the specified component type and a...
void run()
Runs the application. Processes all components in the application's main loop.