Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.ResourceManager Class Reference

Class containing methods for registering and listing resource types. More...

Public Member Functions

bool IsRegistered< T > ()
 Tests to see if a given type has been registered as a resource type. More...
 
bool IsRegistered (Type type)
 Tests to see if a given type has been registered as a resource type. More...
 
void Register< T > (ResourceFormat format, SaveResourceDelegate< T > saveDelegate, LoadResourceDelegate< T > loadDelegate, params string[] extensions)
 Registers the given type as a resource type, providing methods for writing and reading instances to and from a stream and a list of file extensions that are used by files containing resources of the specified type. More...
 

Properties

IEnumerable< Type > RegisteredTypes [get]
 Retrieves a collection of all currently registered resource types. More...
 

Detailed Description

Class containing methods for registering and listing resource types.

Member Function Documentation

bool GameAPI.ResourceManager.IsRegistered ( Type  type)
inline

Tests to see if a given type has been registered as a resource type.

Parameters
typeType to test.

Tests to see if a given type has been registered as a resource type.

Template Parameters
TType to test.
void GameAPI.ResourceManager.Register< T > ( ResourceFormat  format,
SaveResourceDelegate< T >  saveDelegate,
LoadResourceDelegate< T >  loadDelegate,
params string[]  extensions 
)
inline

Registers the given type as a resource type, providing methods for writing and reading instances to and from a stream and a list of file extensions that are used by files containing resources of the specified type.

Template Parameters
TType to register.
Parameters
formatDescribes whether the resource should be compressed when packaged.
saveDelegateDelegate used to write a resource of type T to a stream.
loadDelegateDelegate used to read a resource of type T from a stream.
extensionsA list of file extensions that are used by files containing resources of this type.

Property Documentation

IEnumerable<Type> GameAPI.ResourceManager.RegisteredTypes
get

Retrieves a collection of all currently registered resource types.