Mount Fuji Engine  0.8b
Data Structures | Typedefs | Functions
Resource Management

Data Structures

struct  MFResource
 Base class for a resource. More...
 
struct  MFResourceIterator
 Represents a Fuji resource iterator. More...
 

Typedefs

typedef void( DestroyResourceFunction )(MFResource *)
 Fuji resource destruction callback function prototype.
 

Functions

MF_API int MFResource_Register (const char *pResourceName, DestroyResourceFunction *pDestroyFunc)
 Register a recource type. More...
 
MF_API const char * MFResource_GetTypeName (int type)
 Get the name of a resource type. More...
 
MF_API void MFResource_AddResource (MFResource *pResource, int type, uint32 hash, const char *pName=NULL)
 Add a resource. More...
 
MF_API MFResourceMFResource_Find (uint32 hash)
 Find a resource instance. More...
 
MF_API int MFResource_GetType (MFResource *pResource)
 Get the type of a resource. More...
 
MF_API uint32 MFResource_GetHash (MFResource *pResource)
 Get the hash of a resource. More...
 
MF_API int MFResource_GetRefCount (MFResource *pResource)
 Get the resource reference count. More...
 
MF_API const char * MFResource_GetName (MFResource *pResource)
 Get the resource name. More...
 
MF_API int MFResource_AddRef (MFResource *pResource)
 Add a reference to a resource. More...
 
MF_API int MFResource_Release (MFResource *pResource)
 Release a reference to a resource. More...
 
MF_API int MFResource_GetNumResources (int type=MFRT_All)
 Get number of allocated resources. More...
 
MF_API MFResourceIteratorMFResource_EnumerateFirst (int type=MFRT_All)
 Begin enumeration of resource instances. More...
 
MF_API MFResourceIteratorMFResource_EnumerateNext (MFResourceIterator *pIterator, int type=MFRT_All)
 Get the next resource instance. More...
 
MF_API MFResourceMFResource_Get (MFResourceIterator *pIterator)
 Get a resource instance. More...
 
__forceinline bool MFResource_IsType (MFResource *pResource, int type)
 Test if a resource is of a type. More...
 

Detailed Description