Consolix
Loading...
Searching...
No Matches
Core

The core functionality of the Consolix framework. More...

Files

file  core.hpp
 Entry point for including all core headers of the Consolix framework.
 
file  AppComponentManager.hpp
 Manages application components with lifecycle support.
 
file  application_utils.hpp
 Utility functions for managing application lifecycle and components.
 
file  ConsoleApplication.hpp
 Manages the lifecycle of a console application.
 
file  platform_includes.hpp
 Contains platform-specific API includes and definitions.
 
file  service_utils.hpp
 Utility functions for working with the ServiceLocator.
 
file  ServiceLocator.hpp
 Provides a universal service locator for managing shared resources.
 

Detailed Description

The core functionality of the Consolix framework.

The Core group includes fundamental classes and utilities for managing the application lifecycle, global services, and component interaction.

Main Components:

Key Features:

Header Files:

Example Usage:

#define CONSOLIX_USE_LOGIT 1
int main(int argc, char* argv[]) {
// Initialize the logger. This must be the first component.
// Add a logo component to display the application logo at startup.
// Register a service.
return std::make_shared<std::string>("Hello, Consolix!");
});
// Check and retrieve the service.
std::cout << message << std::endl;
}
// Initialize application components and start the main loop.
});
}
#define CONSOLIX_STREAM()
Fallback for general logging.
Entry point for including all core headers of the Consolix framework.
ColorManipulator color(TextColor color)
Creates a color manipulator for use in output streams.
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 register_service()
Registers a resource with default construction globally. Registers a resource or service using defaul...
T & get_service()
Retrieves a resource globally. Retrieves a reference to a globally registered resource from the Servi...
bool has_service()
Checks if a resource is registered globally.
void run()
Runs the application. Processes all components in the application's main loop.