DotNameLib
Loading...
Searching...
No Matches
dotnamecpp::utils::CustomStringsLoader Class Referencefinal

#include <CustomStringsLoader.hpp>

Inheritance diagram for dotnamecpp::utils::CustomStringsLoader:
Collaboration diagram for dotnamecpp::utils::CustomStringsLoader:

Public Member Functions

 CustomStringsLoader (std::shared_ptr< IAssetManager > assetManager, std::shared_ptr< IJsonSerializer > jsonSerializer, std::string filename="customstrings.json")
 CustomStringsLoader (const CustomStringsLoader &)=delete
CustomStringsLoaderoperator= (const CustomStringsLoader &)=delete
 CustomStringsLoader (CustomStringsLoader &&)=delete
CustomStringsLoaderoperator= (CustomStringsLoader &&)=delete
 ~CustomStringsLoader () override=default
Result< nlohmann::json, JsonErrorload () const override
 Load the custom strings JSON data.
std::optional< std::string > getLocalizedString (const std::string &id, const std::string &locale="en") const override
 Get the Localized String object.
std::optional< std::string > getEmail (const std::string &id) const override
 Get the Email object.
std::optional< std::string > getUrl (const std::string &id) const override
 Get the Url object.
std::optional< std::string > getTel (const std::string &id) const override
 Get the Tel object.
std::optional< std::string > getPath (const std::string &id) const override
 Get the Path object.
std::string getCustomStringSign () const override
 Get the Custom String Sign object.
Public Member Functions inherited from dotnamecpp::utils::ICustomStringsLoader
virtual ~ICustomStringsLoader ()=default

Constructor & Destructor Documentation

◆ CustomStringsLoader() [1/3]

dotnamecpp::utils::CustomStringsLoader::CustomStringsLoader ( std::shared_ptr< IAssetManager > assetManager,
std::shared_ptr< IJsonSerializer > jsonSerializer,
std::string filename = "customstrings.json" )
Here is the caller graph for this function:

◆ CustomStringsLoader() [2/3]

dotnamecpp::utils::CustomStringsLoader::CustomStringsLoader ( const CustomStringsLoader & )
delete
Here is the call graph for this function:

◆ CustomStringsLoader() [3/3]

dotnamecpp::utils::CustomStringsLoader::CustomStringsLoader ( CustomStringsLoader && )
delete
Here is the call graph for this function:

◆ ~CustomStringsLoader()

dotnamecpp::utils::CustomStringsLoader::~CustomStringsLoader ( )
overridedefault

Member Function Documentation

◆ getCustomStringSign()

std::string dotnamecpp::utils::CustomStringsLoader::getCustomStringSign ( ) const
nodiscardoverridevirtual

Get the Custom String Sign object.

Returns
std::string

Implements dotnamecpp::utils::ICustomStringsLoader.

Here is the call graph for this function:

◆ getEmail()

std::optional< std::string > dotnamecpp::utils::CustomStringsLoader::getEmail ( const std::string & id) const
nodiscardoverridevirtual

Get the Email object.

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

Implements dotnamecpp::utils::ICustomStringsLoader.

Here is the caller graph for this function:

◆ getLocalizedString()

std::optional< std::string > dotnamecpp::utils::CustomStringsLoader::getLocalizedString ( const std::string & id,
const std::string & locale = "en" ) const
nodiscardoverridevirtual

Get the Localized String object.

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

Implements dotnamecpp::utils::ICustomStringsLoader.

Here is the caller graph for this function:

◆ getPath()

std::optional< std::string > dotnamecpp::utils::CustomStringsLoader::getPath ( const std::string & id) const
nodiscardoverridevirtual

Get the Path object.

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

Implements dotnamecpp::utils::ICustomStringsLoader.

◆ getTel()

std::optional< std::string > dotnamecpp::utils::CustomStringsLoader::getTel ( const std::string & id) const
nodiscardoverridevirtual

Get the Tel object.

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

Implements dotnamecpp::utils::ICustomStringsLoader.

Here is the caller graph for this function:

◆ getUrl()

std::optional< std::string > dotnamecpp::utils::CustomStringsLoader::getUrl ( const std::string & id) const
nodiscardoverridevirtual

Get the Url object.

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

Implements dotnamecpp::utils::ICustomStringsLoader.

Here is the caller graph for this function:

◆ load()

Result< nlohmann::json, JsonError > dotnamecpp::utils::CustomStringsLoader::load ( ) const
nodiscardoverridevirtual

Load the custom strings JSON data.

Returns
Result<nlohmann::json, JsonError>

Implements dotnamecpp::utils::ICustomStringsLoader.

◆ operator=() [1/2]

CustomStringsLoader & dotnamecpp::utils::CustomStringsLoader::operator= ( const CustomStringsLoader & )
delete
Here is the call graph for this function:

◆ operator=() [2/2]

CustomStringsLoader & dotnamecpp::utils::CustomStringsLoader::operator= ( CustomStringsLoader && )
delete
Here is the call graph for this function:

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