///////////////////////////////////////////////////////////////////// // Created by [Dennis Andersen] [2013] ///////////////////////////////////////////////////////////////////// #ifndef MISC_OYSTER_RESOURCE_H #define MISC_OYSTER_RESOURCE_H namespace Oyster { namespace Resource { struct CustomData; /** A Resource handle representing various resources */ typedef unsigned long OHRESOURCE; typedef void(*CustomUnloadFunction)(void*); typedef const CustomData&(*CustomLoadFunction)(); /** An enum class representing all avalible resources that is supported. */ enum ResourceType { //Byte ResourceType_Byte_Raw, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_ANSI, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UTF8, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UNICODE, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UTF16LE, /**< Handle can be interpeted as char[] or char* */ ResourceType_COUNT, /**< Handle can be interpeted as ? */ ResourceType_UNKNOWN = -1, /**< Handle can be interpeted as void* */ }; /** A struct to return when doing a custom resource Load * By loading this way you are handing over the ownership to the resource loaded. */ struct CustomData { void* loadedData; ///