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

Implementation of IAssetProvider that reads from the local filesystem. This is the standard provider for CLI and Desktop applications. More...

#include <FileAssetProvider.hpp>

+ Inheritance diagram for FileAssetProvider:
+ Collaboration diagram for FileAssetProvider:

Public Member Functions

 ~FileAssetProvider () override
 
std::string loadAsset (std::string_view assetName) const override
 Loads the content of a file from the disk.
 
- Public Member Functions inherited from IAssetProvider
virtual ~IAssetProvider ()
 

Detailed Description

Implementation of IAssetProvider that reads from the local filesystem. This is the standard provider for CLI and Desktop applications.

Definition at line 9 of file FileAssetProvider.hpp.

Constructor & Destructor Documentation

◆ ~FileAssetProvider()

FileAssetProvider::~FileAssetProvider ( )
overridedefault

Member Function Documentation

◆ loadAsset()

std::string FileAssetProvider::loadAsset ( std::string_view  assetName) const
overridevirtual

Loads the content of a file from the disk.

Parameters
assetNameThe path to the file.
Returns
std::string The file content.
Exceptions
std::runtime_errorIf the file cannot be opened.

Implements IAssetProvider.

Definition at line 8 of file FileAssetProvider.cpp.


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