|
Kanzi Graphics Engine
|
Defines functions for different resource types. More...
#include <kzu_resource_base.h>
Data Fields | |
| KzuResourceType | parentType |
| Pointer to the parent class. More... | |
| kzString | typeName |
| Name of the resource class. More... | |
| kzsError(* | destructor )(struct KzuResource *resource) |
| Destructor function for resource. More... | |
| KzuResourceLoaderLoadFromKZBFunction | loadFromKZB |
| Function for loading the resource from .KZB. More... | |
| KzuResourceLoaderLoadFinishFunction | finishLoading |
| Function for finishing the loading of the resource. More... | |
| kzsError(* | unload )(struct KzuResource *resource) |
| Unload function for resource. More... | |
| kzUint(* | getCPUMemoryUsage )(const struct KzuResource *resource) |
| Function for getting the memory usage of a resource. More... | |
Defines functions for different resource types.
| KzuResourceType KzuResourceClass::parentType |
Pointer to the parent class.
KZ_NULL for the first base class.
| kzString KzuResourceClass::typeName |
Name of the resource class.
This is used for internal debugging.
| kzsError(* KzuResourceClass::destructor)(struct KzuResource *resource) |
Destructor function for resource.
This function should release the data allocated in the constructor. Implementations should call super class destructor as the last statement.
| KzuResourceLoaderLoadFromKZBFunction KzuResourceClass::loadFromKZB |
Function for loading the resource from .KZB.
This function is called when loading the data from .KZB file. Implementations should call super class loadFromKZB before reading anything else from inputStream. This function is called from arbitrary loading threads. The parameter threadContext contains thread safe memory manager and a thread specific Property manager which can be locked with the threadLock in the threadContext. This function may not access resource manager or the UIDomain due to race conditions.
| KzuResourceLoaderLoadFinishFunction KzuResourceClass::finishLoading |
Function for finishing the loading of the resource.
This function is called in the main thread after loading the data. Implementations should call super class finishLoading first. The parameter threadContext contains thread safe memory manager and the property manager that was used for loading the resource, which can be locked with the threadLock in the threadContext.
| kzsError(* KzuResourceClass::unload)(struct KzuResource *resource) |
Unload function for resource.
Releases all memory taken by the resource except the resource loader.
| kzUint(* KzuResourceClass::getCPUMemoryUsage)(const struct KzuResource *resource) |
Function for getting the memory usage of a resource.