EnigmaMachineCore 0.1.0
A modular Enigma Machine simulation in C++20
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IAssetProvider Class Referenceabstract

Interface for providing configuration/asset data. Abstracts the source of assets (filesystem, memory, embedded) to allow for decoupling the Enigma Engine from the physical filesystem. More...

#include <IAssetProvider.hpp>

+ Inheritance diagram for IAssetProvider:

Public Member Functions

virtual ~IAssetProvider ()
 
virtual std::string loadAsset (std::string_view assetName) const =0
 Loads the content of an asset.
 

Detailed Description

Interface for providing configuration/asset data. Abstracts the source of assets (filesystem, memory, embedded) to allow for decoupling the Enigma Engine from the physical filesystem.

Definition at line 12 of file IAssetProvider.hpp.

Constructor & Destructor Documentation

◆ ~IAssetProvider()

IAssetProvider::~IAssetProvider ( )
virtualdefault

Member Function Documentation

◆ loadAsset()

virtual std::string IAssetProvider::loadAsset ( std::string_view  assetName) const
pure virtual

Loads the content of an asset.

Parameters
assetNameThe name or path of the asset to load (e.g., "Rotor1.toml").
Returns
std::string The content of the asset.
Exceptions
std::runtime_errorIf the asset cannot be found or read.

Implemented in FileAssetProvider.

Referenced by EnigmaConfigLoader::load(), EnigmaConfigLoader::loadReflector(), and EnigmaConfigLoader::loadRotor().

+ Here is the caller graph for this function:

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