Helper class for the Activity Host class types. More...
#include <kanzi/ui/node/concept/activity/activity_prefab_loader.hpp>
Public Types | |
| using | ActivityPrefabLoaderCallback |
Public Member Functions | |
| ActivityPrefabLoader (NodeWeakPtr callbackOwner, ActivityPrefabLoaderCallback callback) | |
| Constructor. | |
| virtual bool | isValid () const |
| Validates the prefab loading task. | |
| void | onAsyncLoadCompleted (string_view loadedPrefabPath) |
| Callback for asynchronous resource loading. | |
| void | requestPrefabLoading (string_view prefabPath, string_view activityName) |
| Requests the loading of a prefab. | |
| virtual | ~ActivityPrefabLoader ()=default |
| Destructor. | |
Helper class for the Activity Host class types.
This class is responsible for loading a requested prefab and informing the owner class when that prefab is loaded. A new prefab loading request overwrites any existing prefab loading request.
|
inlineexplicit |
Constructor.
| callbackOwner | The node that owns the callback. |
| callback | The callback that Kanzi calls when the prefab loading is completed. |
|
virtualdefault |
Destructor.
| void kanzi::ActivityPrefabLoader::requestPrefabLoading | ( | string_view | prefabPath, |
| string_view | activityName ) |
Requests the loading of a prefab.
| prefabPath | Path to the prefab to load. |
| activityName | The name of an Activity whose prefab to load. |
| void kanzi::ActivityPrefabLoader::onAsyncLoadCompleted | ( | string_view | loadedPrefabPath | ) |
Callback for asynchronous resource loading.
Kanzi calls this callback when the asynchronous resource loading is completed.
| loadedPrefabPath | The path to the loaded prefab. |
Validates the prefab loading task.
Once validated, Kanzi acquires the prefab and calls the callback when the asynchronous resource loading is completed.
Reimplemented in kanzi::ParallelActivityHostConcept::ActivityInParallelHostPrefabLoader.