Drag[en]gine Game Engine  1.21
deFileResource Class Reference

Base file resource class. More...

#include <deFileResource.h>

Inheritance diagram for deFileResource:
deResource deObject deAnimation deArchive 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...
 
TIME_SYSTEM GetModificationTime () const
 Modification time used to detect resources changing on disk while loaded. More...
 
void SetModificationTime (TIME_SYSTEM modificationTime)
 Set modification time used to detect resources changing on disk while loaded. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
Internal Use Only
Warning
Internal Use Only. Do not call!
bool GetOutdated () const
 
void MarkOutdated ()
 
- 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 (deFileResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 Create file resource. More...
 
virtual ~deFileResource ()
 Clean up file resource. More...
 

Additional Inherited Members

- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 
- 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 ( deFileResourceManager resourceManager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime 
)

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.

◆ GetFilename()

const decString& deFileResource::GetFilename ( ) const
inline

Filename or empty string if build from memory.

◆ GetModificationTime()

TIME_SYSTEM deFileResource::GetModificationTime ( ) const
inline

Modification time used to detect resources changing on disk while loaded.

◆ GetOutdated()

bool deFileResource::GetOutdated ( ) const
inline

◆ GetVirtualFileSystem()

deVirtualFileSystem* deFileResource::GetVirtualFileSystem ( ) const
inline

Virtual file system or NULL if build from memory.

◆ MarkOutdated()

void deFileResource::MarkOutdated ( )

◆ SetAsynchron()

void deFileResource::SetAsynchron ( bool  asynchron)

Set if resource is asynchron.

◆ SetModificationTime()

void deFileResource::SetModificationTime ( TIME_SYSTEM  modificationTime)

Set modification time used to detect resources changing on disk while loaded.

Warning
Internal Use Only. Do not call!

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