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

#include <cAppRes.h>

Inheritance diagram for GrayLib::cAppRes:
Gray::cSingleton< cAppRes > GrayLib::cWinResMod Gray::cSingletonStatic< TYPE > Gray::cSingletonRegister Gray::CObject Gray::cHeapObject Gray::IHeapObject

Public Member Functions

 cAppRes ()
 
virtual ~cAppRes ()
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 
- Public Member Functions inherited from GrayLib::cWinResMod
 cWinResMod (HMODULE hModule) noexcept
 
cString LoadStrID (RESOURCEID_t idString) noexcept
 

Static Public Member Functions

static cString GRAYCALL LoadStrID (RESOURCEID_t idString)
 Get a string resource quickly. Can't use the name "LoadString" as its # defined. More...
 
static cString GRAYCALL LoadStr (const GChar_t *pszString)
 
- Static Public Member Functions inherited from Gray::cSingleton< cAppRes >
static cAppRes *__stdcall get_Single ()
 
static TYPE2 *__stdcall get_SingleT ()
 
static cAppRes &__stdcall I ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< TYPE >
static bool isSingleCreated () noexcept
 
static TYPEget_SingleU () noexcept
 
static TYPEget_Single ()
 
template<class TYPE2 >
static TYPE2 *__stdcall get_SingleCast ()
 
static TYPEI () noexcept
 
- Static Public Member Functions inherited from Gray::cSingletonRegister
static void __stdcall ReleaseModule (HMODULE hMod)
 
- Static Public Member Functions inherited from GrayLib::cWinResMod
static constexpr const GChar_tMakeIntResource (RESOURCEID_t id) noexcept
 
static constexpr bool IsIntResource (const GChar_t *pszText) noexcept
 
static constexpr RESOURCEID_t GetIntResource (const GChar_t *pszText) noexcept
 

Additional Inherited Members

- Static Public Attributes inherited from Gray::cSingletonRegister
static cThreadLockFast sm_LockSingle
 common lock for all cSingleton. More...
 
- Protected Member Functions inherited from Gray::cSingleton< cAppRes >
 cSingleton (cAppRes *pObject, const TYPEINFO_t &rAddrCode=typeid(cAppRes)) noexcept
 
virtual ~cSingleton ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< TYPE >
 cSingletonStatic (TYPE *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Member Functions inherited from Gray::cSingletonRegister
 cSingletonRegister (const TYPEINFO_t &rAddrCode) noexcept
 
virtual ~cSingletonRegister ()
 
void RegisterSingleton ()
 
- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 
- Protected Attributes inherited from Gray::cSingletonRegister
HMODULE m_hModuleLoaded
 What modules loaded this ? So singletons can be destroyed if DLL/SO unloads. More...
 
- Protected Attributes inherited from GrayLib::cWinResMod
HMODULE m_hModule
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< TYPE >
static TYPEsm_pThe = nullptr
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

Resources attached to current application. related to cWinResource and cAppState::get_HModule() a RESOURCEID_t is disguised as a pointer. pszResName can be an int as opposed to a pointer. _WIN32 - Multiple cOSModule can be loaded each with its own resources. linux - resources are contained in separate files.

Constructor & Destructor Documentation

◆ cAppRes()

GrayLib::cAppRes::cAppRes ( )

◆ ~cAppRes()

GrayLib::cAppRes::~cAppRes ( )
virtual

Member Function Documentation

◆ LoadStr()

cString GRAYCALL GrayLib::cAppRes::LoadStr ( const GChar_t pszString)
static

this may or may not be a pointer to a string. it may just be an id.

◆ LoadStrID()

cString GRAYCALL GrayLib::cAppRes::LoadStrID ( RESOURCEID_t  idString)
static

Get a string resource quickly. Can't use the name "LoadString" as its # defined.

static version of LoadString() works for MFC as well.

Note
can't use the method name "LoadString" because its defined.

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