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

#include <cASN.h>

Inheritance diagram for GrayLib::cASNBufAlloc:
GrayLib::cASNBuf Gray::cMemBlock

Public Member Functions

 cASNBufAlloc () noexcept
 
 ~cASNBufAlloc ()
 
void SetEmptyBuf ()
 
bool SetAlloc (ASN_TYPE eASNTag, size_t nSize, const void *pData=nullptr)
 
- Public Member Functions inherited from GrayLib::cASNBuf
 cASNBuf () noexcept
 
ASN_TYPE get_ASNType () const noexcept
 
bool isEmptyBuf () const
 
bool isSequence () const noexcept
 
bool isPrintable () const noexcept
 
bool IsEqualBuf (const cASNBuf &b) const
 
bool IsEqualStr (const void *pStr, size_t nSize) const
 
bool IsEqualStr (const cASNBuf &b) const
 
void SetEmptyBuf ()
 
bool get_Bool () const
 
int get_Int () const
 
HRESULT GetDescriptionStr (StrBuilder &s) const
 
 UNITTEST_FRIEND (cASN)
 
- Public Member Functions inherited from Gray::cMemBlock
 cMemBlock () noexcept
 
 cMemBlock (const void *pData, size_t nSize) noexcept
 
 cMemBlock (const cMemBlock &block) noexcept
 
 cMemBlock (const cMemBlock *pBlock) noexcept
 
size_t get_DataSize () const noexcept
 
void * get_Data () const noexcept
 
BYTE * get_DataBytes () const noexcept
 
char * get_DataA () const noexcept
 
 operator const BYTE * () const noexcept
 
bool isValidPtr () const noexcept
 
bool IsValidIndex (size_t i) const noexcept
 
bool IsValidIndex2 (size_t i) const noexcept
 
bool IsValidPtr (const void *p) const noexcept
 
bool IsValidPtr2 (const void *p) const noexcept
 
bool IsZeros () const noexcept
 
bool IsEqualData (const void *pData, size_t nSize) const noexcept
 
bool IsEqualData (const cMemBlock *pData) const noexcept
 
bool IsEqualData (const cMemBlock &data) const noexcept
 
BYTE * GetOffset (size_t nOffset) const
 
const void * get_DataEnd () const noexcept
 
void put_DataPtr (void *pStart) noexcept
 
void put_Size (size_t nSize) noexcept
 
void SetBlock (void *pData, size_t nSize) noexcept
 
void SetEmptyBlock () noexcept
 
void InitZeros () noexcept
 
StrLen_t ConvertToString (char *pszDst, StrLen_t iDstSizeMax) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Gray::cMemBlock
static COMPARE_t __stdcall Compare (const void *pData1, size_t iLen1, const void *pData2, size_t iLen2)
 
- Public Attributes inherited from GrayLib::cASNBuf
ASN_TYPE m_eASNTag
 ASN1 tag defines the data type, e.g. ASN_StringUTF8. ASN_TYPE byte mask. More...
 
- Static Public Attributes inherited from GrayLib::cASNBuf
static const char *const k_szTypeName [ASNF_MASK]
 
- Protected Attributes inherited from Gray::cMemBlock
size_t m_nSize
 size_t of m_pData in bytes. May be determined at runtime. More...
 
void * m_pData
 

Detailed Description

A buffer the I (maybe) own/allocated. Or it might just point into static/unknown space.

Note
this cold leak if i just overwrite already used data.

Constructor & Destructor Documentation

◆ cASNBufAlloc()

GrayLib::cASNBufAlloc::cASNBufAlloc ( )
inlinenoexcept

◆ ~cASNBufAlloc()

GrayLib::cASNBufAlloc::~cASNBufAlloc ( )
inline

Member Function Documentation

◆ SetAlloc()

bool GrayLib::cASNBufAlloc::SetAlloc ( ASN_TYPE  eASNTag,
size_t  nSize,
const void *  pData = nullptr 
)
inline

◆ SetEmptyBuf()

void GrayLib::cASNBufAlloc::SetEmptyBuf ( )
inline

free it only if i allocated it.


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