libnick 2024.12.0
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::App::DataFileManager Class Reference

A manager of data files for an application. More...

#include <datafilemanager.h>

Public Member Functions

 DataFileManager (const std::string &appName)
 Constructs a DataFileManager.
 
 DataFileManager (const DataFileManager &)=delete
 
 DataFileManager (DataFileManager &&)=delete
 
void operator= (const DataFileManager &)=delete
 
void operator= (DataFileManager &&)=delete
 
template<DerivedDataFileBase T>
T & get (const std::string &key)
 Gets a data object.
 

Detailed Description

A manager of data files for an application.

Constructor & Destructor Documentation

◆ DataFileManager() [1/3]

Nickvision::App::DataFileManager::DataFileManager ( const std::string & appName)

Constructs a DataFileManager.

Parameters
appNameThe name of the application (used in determining the path to store data files on disk)

◆ DataFileManager() [2/3]

Nickvision::App::DataFileManager::DataFileManager ( const DataFileManager & )
delete

◆ DataFileManager() [3/3]

Nickvision::App::DataFileManager::DataFileManager ( DataFileManager && )
delete

Member Function Documentation

◆ get()

template<DerivedDataFileBase T>
T & Nickvision::App::DataFileManager::get ( const std::string & key)
inline

Gets a data object.

Template Parameters
TDerived type of DataFileBase
Parameters
keyThe key of the data file
Exceptions
std::invalid_argumentThrown if key is empty
Returns
The data object

◆ operator=() [1/2]

void Nickvision::App::DataFileManager::operator= ( const DataFileManager & )
delete

◆ operator=() [2/2]

void Nickvision::App::DataFileManager::operator= ( DataFileManager && )
delete

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