Set of AssetTypeLoaders mapped to their corrseponding AssetTypes.
More...
#include <le2d/asset/asset_loader.hpp>
|
void | add_loader (std::unique_ptr< detail::IAssetTypeLoaderBase > loader) |
| Associate a loader with its type.
|
|
template<std::derived_from< IAsset > AssetTypeT> |
auto | has_loader () const -> bool |
|
template<std::derived_from< IAsset > AssetTypeT> |
auto | load (std::string_view const uri) const -> std::unique_ptr< AssetTypeT > |
| Load an asset given its URI.
|
|
Set of AssetTypeLoaders mapped to their corrseponding AssetTypes.
◆ add_loader()
Associate a loader with its type.
- Parameters
-
◆ has_loader()
template<std::derived_from<
IAsset > AssetTypeT>
auto le::AssetLoader::has_loader |
( |
| ) |
const -> bool |
|
inline |
- Template Parameters
-
- Returns
- true if loader associated with AssetTypeT exists.
◆ load()
template<std::derived_from<
IAsset > AssetTypeT>
auto le::AssetLoader::load |
( |
std::string_view const |
uri | ) |
const -> std::unique_ptr<AssetTypeT> |
|
inline |
Load an asset given its URI.
- Template Parameters
-
- Parameters
-
- Returns
- Asset instance if loaded, otherwise null.
The documentation for this class was generated from the following file: