Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cXResourceFile Class Reference

#include <cXResourceFile.h>

Inheritance diagram for Gray3D::cXResourceFile:
Gray::cRefBase IUnknown Gray3D::cModel Gray3D::cModel3DS Gray3D::cModelX Gray3D::cXTextureFile Gray3D::cModelXLoader

Public Member Functions

 cXResourceFile (const FILECHAR_t *pszFileName)
 
virtual ~cXResourceFile ()
 
cStringF get_FilePath () const
 
void put_FilePath (const FILECHAR_t *pszFileName)
 
 STDMETHOD_ (cString, get_Name)() const
 
cStringF get_FullPath () const
 
cStringF MakePeerPath (const FILECHAR_t *pszName) const
 
virtual bool isResourceLoaded () const noexcept
 
void put_LoadedState (HRESULT hResLoad)
 
virtual HRESULT LoadResource ()
 
- Public Member Functions inherited from Gray::cRefBase
 cRefBase (int iRefCount=0) noexcept
 
virtual ~cRefBase ()
 
int get_RefCount () const noexcept
 
HASHCODE_t get_HashCode () const noexcept
 
 STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept
 
virtual void onFinalRelease ()
 
bool isValidObj () const noexcept
 
 STDMETHOD_ (ULONG, AddRef)(void) override
 
 STDMETHOD_ (ULONG, Release)(void) override
 
STDMETHOD() QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
 
void IncRefCount ()
 
void DecRefCount ()
 
bool isStaticConstruct () const noexcept
 
void StaticConstruct ()
 
void StaticDestruct ()
 
bool isDestructing () noexcept
 
void SetDestructing ()
 

Static Public Member Functions

static HRESULT GRAYCALL OnFAIL (HRESULT hRes)
 static. so we can trap all errors here. More...
 

Protected Attributes

HRESULT m_hResLoad
 0=loaded OK, <0 = it failed to load for some reason! OLE_E_BLANK = have not yet tried to load. More...
 

Static Protected Attributes

static cStringF s_sFileLoading
 name of file loading for debug. More...
 

Detailed Description

A resource file (DirectX (maybe 3d) related object) that must be loaded and cached. Similar to cXObjPack but not cXObject scriptable. m_sFilePath = if relative (not rooted) path, relative from the base of the g_ResInstall. i.e. X Model File, texture, shader, etc.

Constructor & Destructor Documentation

◆ cXResourceFile()

Gray3D::cXResourceFile::cXResourceFile ( const FILECHAR_t pszFileName)
  • pszFileName = relative path . relative from the base of the g_ResInstall.

◆ ~cXResourceFile()

Gray3D::cXResourceFile::~cXResourceFile ( )
virtual

Member Function Documentation

◆ get_FilePath()

cStringF Gray3D::cXResourceFile::get_FilePath ( ) const
inline

if relative file path. (relative to g_ResInstall) get_FilePath

◆ get_FullPath()

cStringF Gray3D::cXResourceFile::get_FullPath ( ) const

◆ isResourceLoaded()

virtual bool Gray3D::cXResourceFile::isResourceLoaded ( ) const
inlinevirtualnoexcept

Reimplemented in Gray3D::cXTextureFile.

◆ LoadResource()

virtual HRESULT Gray3D::cXResourceFile::LoadResource ( )
inlinevirtual

◆ MakePeerPath()

cStringF Gray3D::cXResourceFile::MakePeerPath ( const FILECHAR_t pszName) const
inline

Get the name of a related object file probably in the same directory.

◆ OnFAIL()

HRESULT GRAYCALL Gray3D::cXResourceFile::OnFAIL ( HRESULT  hRes)
static

static. so we can trap all errors here.

◆ put_FilePath()

void Gray3D::cXResourceFile::put_FilePath ( const FILECHAR_t pszFileName)

if relative file path. (relative to g_ResInstall)

◆ put_LoadedState()

void Gray3D::cXResourceFile::put_LoadedState ( HRESULT  hResLoad)
inline

we tried to load. and succeeded or failed.

◆ STDMETHOD_()

Gray3D::cXResourceFile::STDMETHOD_ ( cString  ,
get_Name   
) const
inline

Member Data Documentation

◆ m_hResLoad

HRESULT Gray3D::cXResourceFile::m_hResLoad
protected

0=loaded OK, <0 = it failed to load for some reason! OLE_E_BLANK = have not yet tried to load.

◆ s_sFileLoading

cStringF Gray3D::cXResourceFile::s_sFileLoading
staticprotected

name of file loading for debug.


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