LosaDev source snapshot 2019

This commit is contained in:
LosaDev committed 2026-11-07 13:30:45 +07:00
commit c198676e97
20588 files changed
+8812878

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
// cBuffer.h: interface for the cBuffer class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_CBUFFER_H__ECE7A49E_767B_4F38_91CE_A4795B0F4535__INCLUDED_)
#define AFX_CBUFFER_H__ECE7A49E_767B_4F38_91CE_A4795B0F4535__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class cBuffer
{
public:
cBuffer();
cBuffer( uint32 uBuffLen );
virtual ~cBuffer();
void Init();
void Destroy();
public:
bool Create( uint32 uBuffLen );
bool Erase();
void Resize( uint32 uBuffLen );
public:
void SetLength( uint32 unLen ) { m_unLen = unLen; }
uint32 GetMaxLength() { return m_unMax; }
uint32 GetLength() { return m_unLen; }
uint8* GetBuffer() const { return m_pDT; }
TCHAR* GetString() const { return reinterpret_cast<TCHAR*>(m_pDT); }
uint8* GetBuffer( uint32 unLen ) const { return (m_pDT+unLen); }
bool Copy( const TCHAR* pDT );
bool Copy( uint32 unDst, const TCHAR* pDT );
bool Copy( const uint8* pDT, uint32 unLen );
bool Copy( uint32 unDst, const uint8* pDT, uint32 unLen );
bool Append( const TCHAR* pDT );
bool Append( const uint8* pDT, uint32 unLen );
protected:
uint8* m_pDT;
uint32 m_unLen;
uint32 m_unMax;
};
#endif // !defined(AFX_CBUFFER_H__ECE7A49E_767B_4F38_91CE_A4795B0F4535__INCLUDED_)