Declaration of the Big Resource Manager functions, BigResourceManager_Clear(), BigResourceManager_AddResource(), and BigResourceManager_GetResource(), used in the Flyweight Pattern. More...
Go to the source code of this file.
Macros | |
#define | __FLYWEIGHT_BIGRESOURCEMANAGER_H__ |
Functions | |
void | BigResourceManager_Clear (void) |
Release all resources owned by the Big Resource Manager. | |
int | BigResourceManager_AddResource (BigResource *rawResource) |
Add a new big resource and return the ID of the resource. If the resource is successfully added, the Big Resource Manager owns the resource and will free it on exit. | |
BigResource * | BigResourceManager_GetResource (int bigResourceId) |
Retrieve the requested big resource. | |
Declaration of the Big Resource Manager functions, BigResourceManager_Clear(), BigResourceManager_AddResource(), and BigResourceManager_GetResource(), used in the Flyweight Pattern.
Definition in file Flyweight_BigResourceManager.h.
#define __FLYWEIGHT_BIGRESOURCEMANAGER_H__ |
Definition at line 9 of file Flyweight_BigResourceManager.h.
int BigResourceManager_AddResource | ( | BigResource * | rawResource | ) |
Add a new big resource and return the ID of the resource. If the resource is successfully added, the Big Resource Manager owns the resource and will free it on exit.
rawResource | The BigResource object to add. |
Definition at line 114 of file Flyweight_BigResourceManager.c.
References _resources, and BigResourceList_AddResource().
Referenced by _Flyweight_GenerateBigResource().
void BigResourceManager_Clear | ( | void | ) |
Release all resources owned by the Big Resource Manager.
Definition at line 105 of file Flyweight_BigResourceManager.c.
References _resources, and BigResourceList_Clear().
Referenced by Flyweight_Exercise().
BigResource * BigResourceManager_GetResource | ( | int | bigResourceId | ) |
Retrieve the requested big resource.
bigResourceId | Handle to the big resource to retrieve. |
Definition at line 127 of file Flyweight_BigResourceManager.c.
References _resources, BigResourceList::resources, and BigResourceList::resources_count.
Referenced by BigResource_Render().