8#ifndef TRITON_RESOURCE_LOADER_H
9#define TRITON_RESOURCE_LOADER_H
12%module TritonResourceLoader
14SWIG_CSBODY_PROXY(
public,
public, SWIGTYPE)
15SWIG_CSBODY_TYPEWRAPPER(
public,
public,
public, SWIGTYPE)
18using namespace Triton;
22#if defined(WIN32) || defined(WIN64)
23#pragma warning (disable: 4786)
49 ResourceLoader(
const char *resourceDirPath,
bool useAddDllDirectory =
false);
84 virtual bool TRITONAPI
LoadResource(
const char *pathName,
char*& data,
unsigned int& dataLen,
bool text);
99 char* Data(
void)
const;
103 unsigned int dataLen;
A class for loading Triton's resources from mass storage, which you may extend.
Common typedefs and defines used within Triton.
This base class for all Triton objects intercepts the new and delete operators, routing them through ...
Definition: MemAlloc.h:71
This class is used whenever Triton needs to load textures, data files, or shaders from mass storage; ...
Definition: ResourceLoader.h:40
ResourceLoader(const char *resourceDirPath, bool useAddDllDirectory=false)
Constructor.
virtual bool TRITONAPI LoadResource(const char *pathName, char *&data, unsigned int &dataLen, bool text)
Load a resource from mass storage; the default implementation uses the POSIX functions fopen(),...
virtual void TRITONAPI SetResourceDirPath(const char *path, bool useAddDllDirectory=false)
Sets the path to the Triton resources folder, which will be pre-pended to all resource filenames pass...
virtual void TRITONAPI FreeResource(char *data)
Frees the resource data memory that was returned from LoadResource().
virtual ~ResourceLoader()
Virtual destructor; frees the memory of the resource path string.
virtual const char *TRITONAPI GetResourceDirPath() const
Retrieves the path set by SetResourceDirPath().
Definition: ResourceLoader.h:66