DotNameLib
Loading...
Searching...
No Matches
dotnamecpp::assets::AssetManager Class Reference

#include <AssetManager.hpp>

Inheritance diagram for dotnamecpp::assets::AssetManager:
Collaboration diagram for dotnamecpp::assets::AssetManager:

Public Member Functions

 AssetManager (std::filesystem::path assetsPath)
 Construct a new Asset Manager object.
const std::filesystem::path & getAssetsPath () const override
 Get the Assets Path object.
std::filesystem::path resolveAsset (const std::filesystem::path &relativePath) const override
 Resolve the full path of an asset given its relative path.
bool assetExists (const std::filesystem::path &relativePath) const override
 Check if an asset exists given its relative path.
bool validate () const override
 Validate the asset manager configuration.
Public Member Functions inherited from dotnamecpp::assets::IAssetManager
virtual ~IAssetManager ()=default

Static Public Member Functions

static std::unique_ptr< IAssetManagercreate (const std::filesystem::path &executablePath, const std::string &appName)
 Create a new Asset Manager instance.

Constructor & Destructor Documentation

◆ AssetManager()

dotnamecpp::assets::AssetManager::AssetManager ( std::filesystem::path assetsPath)
explicit

Construct a new Asset Manager object.

Parameters
assetsPath

Member Function Documentation

◆ assetExists()

bool dotnamecpp::assets::AssetManager::assetExists ( const std::filesystem::path & relativePath) const
nodiscardoverridevirtual

Check if an asset exists given its relative path.

Parameters
relativePath
Returns
true
false

Implements dotnamecpp::assets::IAssetManager.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

std::unique_ptr< IAssetManager > dotnamecpp::assets::AssetManager::create ( const std::filesystem::path & executablePath,
const std::string & appName )
static

Create a new Asset Manager instance.

Parameters
executablePath
appName
Returns
std::unique_ptr<IAssetManager>
Here is the caller graph for this function:

◆ getAssetsPath()

const std::filesystem::path & dotnamecpp::assets::AssetManager::getAssetsPath ( ) const
nodiscardoverridevirtual

Get the Assets Path object.

Returns
const std::filesystem::path&

Implements dotnamecpp::assets::IAssetManager.

Here is the caller graph for this function:

◆ resolveAsset()

std::filesystem::path dotnamecpp::assets::AssetManager::resolveAsset ( const std::filesystem::path & relativePath) const
nodiscardoverridevirtual

Resolve the full path of an asset given its relative path.

Parameters
relativePath
Returns
std::filesystem::path

Implements dotnamecpp::assets::IAssetManager.

Here is the caller graph for this function:

◆ validate()

bool dotnamecpp::assets::AssetManager::validate ( ) const
nodiscardoverridevirtual

Validate the asset manager configuration.

Returns
true
false

Implements dotnamecpp::assets::IAssetManager.

Here is the caller graph for this function:

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