用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
537 B

10 months ago
#pragma once
namespace SOUI{
class UTILITIES_API SAutoBuf
{
public:
SAutoBuf();
SAutoBuf(size_t nElements);
~SAutoBuf();
operator char *() const;
char* operator ->() const;
const char & operator[] (int i) const;
char & operator[] (int i);
void Attach(char *pBuf,size_t size);
//return buffer, must be freed using soui_mem_wrapper::SouiFree
char *Detach();
char* Allocate(size_t nElements);
size_t size();
void Free();
private:
char * m_pBuf;
size_t m_nSize;
bool m_bExternalBuf;
};
}