My Project
Public Member Functions | List of all members
ParaEngine::IDataLoader Class Referenceabstract

IDataLoader is an interface that the AsyncLoader class uses to load data from disk. More...

#include <IDataLoader.h>

Inheritance diagram for ParaEngine::IDataLoader:
ParaEngine::CadModelLoader ParaEngine::CCCSFaceLoader ParaEngine::CCCSSkinLoader ParaEngine::CMeshLoader ParaEngine::CParaXLoader ParaEngine::CTextureLoader ParaEngine::CUrlLoader

Public Member Functions

virtual const char * GetFileName ()
 get the file name
 
virtual const char * GetKeyName ()
 get the key name
 
virtual HRESULT Decompress (void **ppData, int *pcBytes)=0
 Decompress is called by one of the processing threads to decompress the data. More...
 
virtual HRESULT Destroy ()=0
 Destroy is called by the graphics thread when it has consumed the data, unless IsDeviceObject() is false. More...
 
virtual HRESULT Load ()=0
 Load is called from the IO thread to load data. More...
 
virtual void SetEstimatedSizeInBytes (int nSize)
 this function is solely used in statistics reporting. More...
 
virtual int GetEstimatedSizeInBytes ()
 this function is solely used in statistics reporting. More...
 
virtual bool IsDeviceObject ()
 default to true. More...
 

Detailed Description

IDataLoader is an interface that the AsyncLoader class uses to load data from disk.

Load is called from the IO thread to load data. Decompress is called by one of the processing threads to decompress the data. Destroy is called by the graphics thread when it has consumed the data.

Member Function Documentation

§ Decompress()

virtual HRESULT ParaEngine::IDataLoader::Decompress ( void **  ppData,
int *  pcBytes 
)
pure virtual

§ Destroy()

virtual HRESULT ParaEngine::IDataLoader::Destroy ( )
pure virtual

§ GetEstimatedSizeInBytes()

virtual int ParaEngine::IDataLoader::GetEstimatedSizeInBytes ( )
inlinevirtual

this function is solely used in statistics reporting.

Reimplemented in ParaEngine::CUrlLoader.

§ IsDeviceObject()

virtual bool ParaEngine::IDataLoader::IsDeviceObject ( )
inlinevirtual

default to true.

If not true, Destroy() will be called in the worker thread instead of render thread.

Reimplemented in ParaEngine::CUrlLoader.

§ Load()

virtual HRESULT ParaEngine::IDataLoader::Load ( )
pure virtual

§ SetEstimatedSizeInBytes()

virtual void ParaEngine::IDataLoader::SetEstimatedSizeInBytes ( int  nSize)
inlinevirtual

this function is solely used in statistics reporting.

can only be called once immediately after a data loader is constructed.

Reimplemented in ParaEngine::CUrlLoader.


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