Drag[en]gine Game Engine  1.0
deFileResource Class Reference

Base file resource class. More...

#include <deFileResource.h>

Inheritance diagram for deFileResource:
deResource deObject deAnimation deFont deImage deLanguagePack deModel deOcclusionMesh deRig deSkin deSound deVideo

Public Member Functions

Management
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deFileResource (deResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename)
 Create file resource. More...
 
virtual ~deFileResource ()
 Clean up file resource. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Base file resource class.

Provides the basic class for all resources loadable from a file. The asynchron flag indicates if this resource is currently handled by the resource loader. Asynchron resources exist in a thread alongside the main thread and can require special treatment in single type modules.

Constructor & Destructor Documentation

◆ deFileResource()

deFileResource::deFileResource ( deResourceManager resourceManager,
deVirtualFileSystem vfs,
const char *  filename 
)

Create file resource.

◆ ~deFileResource()

virtual deFileResource::~deFileResource ( )
protectedvirtual

Clean up file resource.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetAsynchron()

bool deFileResource::GetAsynchron ( ) const
inline

Resource is asynchron.

References SetAsynchron().

◆ GetFilename()

const decString& deFileResource::GetFilename ( ) const
inline

Filename or empty string if build from memory.

◆ GetVirtualFileSystem()

deVirtualFileSystem* deFileResource::GetVirtualFileSystem ( ) const
inline

Virtual file system or NULL if build from memory.

◆ SetAsynchron()

void deFileResource::SetAsynchron ( bool  asynchron)

Set if resource is asynchron.

Referenced by GetAsynchron().


The documentation for this class was generated from the following file: