|
static std::unique_ptr< IKeybindProvider > | createKeybindProvider () |
|
static std::unique_ptr< IWindowManager > | createWindowManager (const Settings &settings) |
| Creates a window manager instance.
|
|
static std::unique_ptr< ImGuiManager > | createImGuiManager (IWindowManager *windowManager, IConfigService *configService) |
| Creates a GUI manager instance.
|
|
static std::unique_ptr< IAssetManager > | createAssetManager (IWindowManager *windowManager, TTF_Font *font, IConfigService *configService, size_t index, const std::vector< TableData > &tables, ISoundManager *soundManager) |
| Creates an asset manager instance.
|
|
static std::unique_ptr< IRenderer > | createRenderer (IWindowManager *windowManager) |
| Creates a renderer instance.
|
|
static std::unique_ptr< ISoundManager > | createSoundManager (const Settings &settings) |
| Creates a sound manager instance.
|
|
static std::unique_ptr< IConfigService > | createConfigService (const std::string &configPath, IKeybindProvider *keybindProvider) |
| Creates a configuration service instance.
|
|
static std::unique_ptr< IScreenshotManager > | createScreenshotManager (const std::string &exeDir, IConfigService *configService, IKeybindProvider *keybindProvider, ISoundManager *soundManager) |
| Creates a screenshot manager instance.
|
|
static std::unique_ptr< IInputManager > | createInputManager (IKeybindProvider *keybindProvider) |
| Creates an input manager instance.
|
|
static std::unique_ptr< ConfigUI > | createConfigUI (IConfigService *configService, IKeybindProvider *keybindProvider, IAssetManager *assets, size_t *currentIndex, std::vector< TableData > *tables, App *app, bool &showConfig) |
| Creates a configuration UI instance.
|
|
static std::unique_ptr< ITableLauncher > | createTableLauncher (IConfigService *configService) |
|
static std::unique_ptr< ITableCallbacks > | createTableCallbacks (IConfigService *configService) |
| Creates a table callbacks instance.
|
|
Static factory for creating component instances.
This class provides static methods to create instances of key application components, such as IWindowManager, ImGuiManager, IAssetManager, and others, configured with the necessary dependencies. It is used by the App class to initialize the application. The factory supports customization through settings (e.g., via IConfigService) and can be extended with configUI to allow user-defined parameters (e.g., window sizes, asset loading behavior).
Creates an asset manager instance.
Initializes an AssetManager with renderers from the window manager, a TTF font, a configuration service, and table data, then loads assets for the specified table index. The method currently skips asset loading (commented out) but can be extended to support configurable asset paths or preload options via configUI.
- Parameters
-
windowManager | The window manager for accessing renderers. |
font | The TTF font for text rendering. |
configService | The configuration service for settings. |
index | The index of the table to load assets for. |
tables | The list of table data. |
soundManager | The sound manager for handling audio assets. |
- Returns
- A unique pointer to an IAssetManager instance.
Initializes an AssetManager with renderers from the window manager, a TTF font, a configuration service, and table data, then loads assets for the specified table index.
- Parameters
-
windowManager | The window manager for accessing renderers. |
font | The TTF font for text rendering. |
configService | The configuration service for settings. |
index | The index of the table to load assets for. |
tables | The list of table data. |
soundManager | The sound manager for handling audio assets. |
- Returns
- A unique pointer to an IAssetManager instance.
Creates a configuration UI instance.
Initializes a ConfigUI with the configuration service, keybind manager (from configService), asset manager, table data, main application instance, and configuration UI visibility flag. This UI allows user interaction with settings and could be enhanced with additional configurable options via configUI.
- Parameters
-
configService | The configuration service for settings. |
assets | The asset manager for accessing textures and video players. |
currentIndex | Pointer to the current table index. |
tables | Pointer to the list of table data. |
app | The main application instance. |
showConfig | Reference to the configuration UI visibility flag. |
- Returns
- A unique pointer to a ConfigUI instance.
Initializes a ConfigUI with the configuration service, keybind manager (from configService), asset manager, table data, main application instance, and configuration UI visibility flag.
- Parameters
-
configService | The configuration service for settings. |
assets | The asset manager for accessing textures and video players. |
currentIndex | Pointer to the current table index. |
tables | Pointer to the list of table data. |
app | The main application instance. |
showConfig | Reference to the configuration UI visibility flag. |
- Returns
- A unique pointer to a ConfigUI instance.
Creates a GUI manager instance.
Initializes a ImGuiManager with the provided window manager and configuration service, and calls its initialize method to set up the ImGui context. The configuration service provides settings (e.g., UI theme) that could be user-customizable via configUI.
- Parameters
-
windowManager | The window manager for accessing SDL windows and renderers. |
configService | The configuration service for accessing settings. |
- Returns
- A unique pointer to a ImGuiManager instance.
Initializes a ImGuiManager with the provided window manager and configuration service, and calls its initialize method to set up the ImGui context.
- Parameters
-
windowManager | The window manager for accessing SDL windows and renderers. |
configService | The configuration service for accessing settings. |
- Returns
- A unique pointer to a ImGuiManager instance.
Creates a renderer instance.
Initializes a Renderer with renderers from the window manager for playfield, backglass, and DMD displays. Future enhancements could allow renderer settings (e.g., resolution, effects) to be configurable via configUI.
- Parameters
-
windowManager | The window manager for accessing renderers. |
- Returns
- A unique pointer to a Renderer instance.
Initializes a Renderer with renderers from the window manager for playfield, backglass, and DMD displays.
- Parameters
-
windowManager | The window manager for accessing renderers. |
- Returns
- A unique pointer to a Renderer instance.
Creates a screenshot manager instance.
Initializes a ScreenshotManager with the executable directory, configuration service, keybind manager (from configService), and sound manager. The manager handles screenshot capture and could support configurable save paths or formats via configUI.
- Parameters
-
exeDir | The executable directory for resolving screenshot paths. |
configService | The configuration service for settings. |
soundManager | The sound manager for screenshot-related sounds. |
- Returns
- A unique pointer to an IScreenshotManager instance.
Initializes a ScreenshotManager with the executable directory, configuration service, keybind manager (from configService), and sound manager.
- Parameters
-
exeDir | The executable directory for resolving screenshot paths. |
configService | The configuration service for settings. |
soundManager | The sound manager for screenshot-related sounds. |
- Returns
- A unique pointer to an IScreenshotManager instance.
Creates a window manager instance.
Initializes a WindowManager with the provided settings for configuring SDL windows and renderers (e.g., playfield, backglass, DMD). The settings can include resolution, fullscreen mode, and other display options, which may be made configurable via configUI in the future.
- Parameters
-
settings | The application settings for window configuration. |
- Returns
- A unique pointer to an IWindowManager instance.
Initializes a WindowManager with the provided settings for configuring SDL windows and renderers.
- Parameters
-
settings | The application settings for window configuration. |
- Returns
- A unique pointer to an IWindowManager instance.