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 > getLocalizedString (const std::string &id, const std::string &locale="en") const =0
 Get the Localized String object.
virtual std::optional< std::string > getEmail (const std::string &id) const =0
 Get the Email object.
virtual std::optional< std::string > getUrl (const std::string &id) const =0
 Get the Url object.
virtual std::optional< std::string > getTel (const std::string &id) const =0
 Get the Tel object.
virtual std::optional< std::string > getPath (const std::string &id) const =0
 Get the Path object.
virtual std::string getCustomStringSign () const =0
 Get the Custom String Sign object.

Detailed Description

Interface for loading custom strings from JSON.

Constructor & Destructor Documentation

◆ ~ICustomStringsLoader()

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

Member Function Documentation

◆ getCustomStringSign()

virtual std::string dotnamecpp::utils::ICustomStringsLoader::getCustomStringSign ( ) const
nodiscardpure virtual

Get the Custom String Sign object.

Returns
std::string

Implemented in dotnamecpp::utils::CustomStringsLoader.

◆ getEmail()

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

Get the Email object.

Parameters
id
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.

◆ getTel()

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

Get the Tel object.

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

Implemented in dotnamecpp::utils::CustomStringsLoader.

◆ getUrl()

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

Get the Url 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: