@@ -8,43 +8,43 @@ namespace cage
88{
99 class File ;
1010
11- class CAGE_CORE_API AssetManager : private Immovable
11+ class CAGE_CORE_API AssetsManager : private Immovable
1212 {
1313 public:
1414 template <uint32 Scheme, class T >
15- void defineScheme (const AssetScheme &value)
15+ void defineScheme (const AssetsScheme &value)
1616 {
1717 defineScheme_ (detail::typeHash<T>(), Scheme, value);
1818 }
1919
2020 // begin thread-safe methods
2121
22- void load (uint32 assetName );
23- void unload (uint32 assetName );
24- void reload (uint32 assetName );
22+ void load (uint32 assetId );
23+ void unload (uint32 assetId );
24+ void reload (uint32 assetId );
2525
26- uint32 generateUniqueName ();
26+ uint32 generateUniqueId ();
2727
2828 template <uint32 Scheme, class T >
29- void loadValue (uint32 assetName , Holder<T> &&value, const String &textId = " " )
29+ void loadValue (uint32 assetId , Holder<T> &&value, const String &textId = " " )
3030 {
3131 CAGE_ASSERT (detail::typeHash<T>() == schemeTypeHash_ (Scheme))
32- load_ (Scheme, assetName , textId, std::move (value).template cast <void >());
32+ load_ (Scheme, assetId , textId, std::move (value).template cast <void >());
3333 }
3434
3535 template <uint32 Scheme, class T >
36- void loadCustom (uint32 assetName , const AssetScheme &customScheme, Holder<void > &&customData, const String &textId = " " )
36+ void loadCustom (uint32 assetId , const AssetsScheme &customScheme, Holder<void > &&customData, const String &textId = " " )
3737 {
3838 CAGE_ASSERT (detail::typeHash<T>() == schemeTypeHash_ (Scheme))
39- load_ (Scheme, assetName , textId, customScheme, std::move (customData));
39+ load_ (Scheme, assetId , textId, customScheme, std::move (customData));
4040 }
4141
4242 // returns null if the asset is not yet loaded, failed to load, or has different scheme
4343 template <uint32 Scheme, class T >
44- Holder<T> get (uint32 assetName ) const
44+ Holder<T> get (uint32 assetId ) const
4545 {
4646 CAGE_ASSERT (detail::typeHash<T>() == schemeTypeHash_ (Scheme))
47- return get_ (Scheme, assetName ).template cast <T>();
47+ return get_ (Scheme, assetId ).template cast <T>();
4848 }
4949
5050 // end thread-safe methods
@@ -56,15 +56,15 @@ namespace cage
5656 bool processing () const ;
5757 bool empty () const ;
5858
59- EventDispatcher<bool (uint32 requestName , String &foundName, Holder<File> &foundFile)> findAsset; // this event is called from loading threads
59+ EventDispatcher<bool (uint32 requestId , String &foundName, Holder<File> &foundFile)> findAsset; // this event is called from loading threads
6060
6161 private:
62- void defineScheme_ (uint32 typeHash, uint32 scheme, const AssetScheme &value);
63- void load_ (uint32 scheme, uint32 assetName , const String &textId, Holder<void > &&value);
64- void load_ (uint32 scheme, uint32 assetName , const String &textId, const AssetScheme &customScheme, Holder<void > &&customData);
65- Holder<void > get_ (uint32 scheme, uint32 assetName ) const ;
62+ void defineScheme_ (uint32 typeHash, uint32 scheme, const AssetsScheme &value);
63+ void load_ (uint32 scheme, uint32 assetId , const String &textId, Holder<void > &&value);
64+ void load_ (uint32 scheme, uint32 assetId , const String &textId, const AssetsScheme &customScheme, Holder<void > &&customData);
65+ Holder<void > get_ (uint32 scheme, uint32 assetId ) const ;
6666 uint32 schemeTypeHash_ (uint32 scheme) const ;
67- friend class AssetOnDemand ;
67+ friend class AssetsOnDemand ;
6868 };
6969
7070 struct CAGE_CORE_API AssetManagerCreateConfig
@@ -75,14 +75,14 @@ namespace cage
7575 uint32 schemesMaxCount = 100 ; // 0..49 for engine and 50..99 for the game
7676 };
7777
78- CAGE_CORE_API Holder<AssetManager> newAssetManager (const AssetManagerCreateConfig &config);
78+ CAGE_CORE_API Holder<AssetsManager> newAssetsManager (const AssetManagerCreateConfig &config);
7979
8080 struct CAGE_CORE_API AssetPack
8181 {};
82- CAGE_CORE_API AssetScheme genAssetSchemePack ();
82+ CAGE_CORE_API AssetsScheme genAssetSchemePack ();
8383 constexpr uint32 AssetSchemeIndexPack = 0 ;
8484
85- CAGE_CORE_API AssetScheme genAssetSchemeRaw ();
85+ CAGE_CORE_API AssetsScheme genAssetSchemeRaw ();
8686 constexpr uint32 AssetSchemeIndexRaw = 1 ;
8787}
8888
0 commit comments