Facebook Twitter YouTube

class ResourceDescriptor

Defined in:  TSResources.h
Contains information about a resource type.
Definition

class ResourceDescriptor

Constructor

ResourceDescriptor(const char *type, unsigned_int32 flags = 0, unsigned_int32 cacheSize = 0, const char *defaultName = "");

Parameters
type A pointer to a three-character or four-character type string for the resource. This should be the resource's file extension without the preceding dot.
flags Flags for the resource type. See below for possible values.
cacheSize The size of the memory cache allocated for the resource type.
defaultName The name of a resource to load by default when an attempt to load a resource fails.
Description
The ResourceDescriptor class contains information about a specific resource type and controls how the Resource Manager handles that type of resource.

The type parameter must point to a three-character sequence giving the file extension for resources of the type to which the resource descriptor pertains. The flags parameter can be a combination (through logical OR) of the following constants.
kResourceDontAppendType The three-character type is not be appended to resource names as a file extension.
kResourceTerminatorByte An extra byte is added to the end of the memory allocated for this type of resource, and it is set to zero.
If nonzero, the cacheSize parameter specifies the size of the memory cache allocated by the Resource Manager to hold recently released resources of the descriptor's type.

If the defaultName parameter is not the empty string, then it specifies a resource to load by default when an attempt to load a resource of the descriptor's type fails. (The defaultName parameter cannot be nullptr.)