DotNameLib
Loading...
Searching...
No Matches
dotnamecpp::utils::ICustomStringsLoader Class Referenceabstract

Interface for loading custom strings from JSON. More...

#include <ICustomStringsLoader.hpp>

Inheritance diagram for dotnamecpp::utils::ICustomStringsLoader:
Collaboration diagram for dotnamecpp::utils::ICustomStringsLoader:

Public Member Functions

virtual ~ICustomStringsLoader ()=default
virtual Result< nlohmann::json, JsonErrorload () const =0
 Load the custom strings JSON data.
virtual std::optional< std::string > getPath (const std::string &id) const =0
 Get the Path object.
virtual std::optional< std::string > getCustomKey (const std::string &id, const std::string &key) const =0
 Get the Custom Key object.
virtual std::optional< std::string > getLocalizedString (const std::string &id, const std::string &locale="en") const =0
 Get the Localized String object.

Detailed Description

Interface for loading custom strings from JSON.

Constructor & Destructor Documentation

◆ ~ICustomStringsLoader()

virtual dotnamecpp::utils::ICustomStringsLoader::~ICustomStringsLoader ( )
virtualdefault

Member Function Documentation

◆ getCustomKey()

virtual std::optional< std::string > dotnamecpp::utils::ICustomStringsLoader::getCustomKey ( const std::string & id,
const std::string & key ) const
nodiscardpure virtual

Get the Custom Key object.

Parameters
id
key
Returns
std::optional<std::string>

Implemented in dotnamecpp::utils::CustomStringsLoader.

◆ getLocalizedString()

virtual std::optional< std::string > dotnamecpp::utils::ICustomStringsLoader::getLocalizedString ( const std::string & id,
const std::string & locale = "en" ) const
nodiscardpure virtual

Get the Localized String object.

Parameters
id
locale
Returns
std::optional<std::string>

Implemented in dotnamecpp::utils::CustomStringsLoader.

◆ getPath()

virtual std::optional< std::string > dotnamecpp::utils::ICustomStringsLoader::getPath ( const std::string & id) const
nodiscardpure virtual

Get the Path object.

Parameters
id
Returns
std::optional<std::string>

Implemented in dotnamecpp::utils::CustomStringsLoader.

◆ load()

virtual Result< nlohmann::json, JsonError > dotnamecpp::utils::ICustomStringsLoader::load ( ) const
nodiscardpure virtual

Load the custom strings JSON data.

Returns
Result<nlohmann::json, JsonError>

Implemented in dotnamecpp::utils::CustomStringsLoader.


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