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

#include <cString.h>

Inheritance diagram for Gray::CStringData:
Gray::cRefBase Gray::cHeapObject IUnknown Gray::IHeapObject

Public Member Functions

void * GetString () const
 
void * operator new (size_t stAllocateBlock, StrLen_t iStringLengthBytes)
 
void operator delete (void *pObj, StrLen_t iStringLengthBytes)
 
void operator delete (void *pObj)
 
StrLen_t get_CharCount () const noexcept
 
void put_CharCount (StrLen_t nCount) noexcept
 
- 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 ()
 
- 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
 

Additional Inherited Members

Detailed Description

Equiv to the MFC ATL:CStringData. Variable size allocation for this. May contain UTF8 or UNICODE string.

Member Function Documentation

◆ get_CharCount()

StrLen_t Gray::CStringData::get_CharCount ( ) const
inlinenoexcept
Returns
Number of chars. (not necessarily bytes)

◆ GetString()

void* Gray::CStringData::GetString ( ) const
inline

Get a pointer to the characters of the string. Stored in the space allocated after this class.

◆ operator delete() [1/2]

void Gray::CStringData::operator delete ( void *  pObj)
inline

◆ operator delete() [2/2]

void Gray::CStringData::operator delete ( void *  pObj,
StrLen_t  iStringLengthBytes 
)
inline

◆ operator new()

void* Gray::CStringData::operator new ( size_t  stAllocateBlock,
StrLen_t  iStringLengthBytes 
)
inline
Note
Make sure this is compatible with realloc() !! must set m_nCharCount after this ! iStringLengthBytes = length in bytes includes space for '\0'.

◆ put_CharCount()

void Gray::CStringData::put_CharCount ( StrLen_t  nCount)
inlinenoexcept
Returns
Number of chars. (not necessarily bytes). NOT including '/0'

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