ASAPCabinetFE
 
Loading...
Searching...
No Matches
IConfigService Class Referenceabstract

Interface for configuration services (forward declaration). More...

#include <process_handler.h>

+ Inheritance diagram for IConfigService:
+ Collaboration diagram for IConfigService:

Public Member Functions

virtual ~IConfigService ()=default
 Virtual destructor for proper cleanup of derived classes.
 
virtual const SettingsgetSettings () const =0
 Gets the current application settings (read-only).
 
virtual SettingsgetMutableSettings ()=0
 Gets the current application settings (mutable).
 
virtual IKeybindProvidergetKeybindProvider ()=0
 Gets the keybinding provider.
 
virtual bool isConfigValid () const =0
 Checks if the configuration is valid.
 
virtual void loadConfig ()=0
 Loads configuration data from the JSON file.
 
virtual void saveConfig ()=0
 Saves the current configuration data to the JSON file.
 
virtual void updateWindowSetup (int &playfieldX, int &playfieldY, int &playfieldWidth, int &playfieldHeight, int &backglassX, int &backglassY, int &backglassWidth, int &backglassHeight, int &dmdX, int &dmdY, int &dmdWidth, int &dmdHeight, int &topperX, int &topperY, int &topperWidth, int &topperHeight)=0
 Updates window setup coordinates and dimensions.
 

Detailed Description

Interface for configuration services (forward declaration).

Interface for managing application configuration and keybindings in ASAPCabinetFE.

This pure virtual class defines methods for retrieving and modifying application settings, validating configuration, loading and saving JSON-based configuration data, managing keybindings via IKeybindProvider, and updating window positions for playfield, backglass, DMD, and topper displays. Implementers handle JSON configuration file operations and provide a standardized interface for configuration management.

Member Function Documentation

◆ getKeybindProvider()

virtual IKeybindProvider & IConfigService::getKeybindProvider ( )
pure virtual

Gets the keybinding provider.

Provides access to the IKeybindProvider for managing input mappings.

Returns
A reference to the IKeybindProvider object.

Implemented in ConfigService.

◆ getMutableSettings()

virtual Settings & IConfigService::getMutableSettings ( )
pure virtual

Gets the current application settings (mutable).

Provides mutable access to settings for updating configuration (e.g., via ConfigUI).

Returns
A reference to the Settings object.

Implemented in ConfigService.

◆ getSettings()

virtual const Settings & IConfigService::getSettings ( ) const
pure virtual

Gets the current application settings (read-only).

Returns
A const reference to the Settings object containing current configuration.

Implemented in ConfigService.

+ Here is the caller graph for this function:

◆ isConfigValid()

virtual bool IConfigService::isConfigValid ( ) const
pure virtual

Checks if the configuration is valid.

Validates essential configuration parameters such as file paths and permissions.

Returns
True if the configuration is valid, false otherwise.

Implemented in ConfigService.

+ Here is the caller graph for this function:

◆ loadConfig()

virtual void IConfigService::loadConfig ( )
pure virtual

Loads configuration data from the JSON file.

Reads and parses the configuration file, applying defaults if the file is missing.

Implemented in ConfigService.

◆ saveConfig()

virtual void IConfigService::saveConfig ( )
pure virtual

Saves the current configuration data to the JSON file.

Writes the current settings and keybindings to the configuration file.

Implemented in ConfigService.

+ Here is the caller graph for this function:

◆ updateWindowSetup()

virtual void IConfigService::updateWindowSetup ( int &  playfieldX,
int &  playfieldY,
int &  playfieldWidth,
int &  playfieldHeight,
int &  backglassX,
int &  backglassY,
int &  backglassWidth,
int &  backglassHeight,
int &  dmdX,
int &  dmdY,
int &  dmdWidth,
int &  dmdHeight,
int &  topperX,
int &  topperY,
int &  topperWidth,
int &  topperHeight 
)
pure virtual

Updates window setup coordinates and dimensions.

Updates the configuration with the current window positions and sizes for playfield, backglass, DMD, and topper displays, then saves the changes.

Parameters
playfieldXReference to the playfield window X coordinate.
playfieldYReference to the playfield window Y coordinate.
playfieldWidthReference to the playfield window width.
playfieldHeightReference to the playfield window height.
backglassXReference to the backglass window X coordinate.
backglassYReference to the backglass window Y coordinate.
backglassWidthReference to the backglass window width.
backglassHeightReference to the backglass window height.
dmdXReference to the DMD window X coordinate.
dmdYReference to the DMD window Y coordinate.
dmdWidthReference to the DMD window width.
dmdHeightReference to the DMD window height.
topperXReference to the topper window X coordinate.
topperYReference to the topper window Y coordinate.
topperWidthReference to the topper window width.
topperHeightReference to the topper window height.

Implemented in ConfigService.


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