bufferdatasource.h

来自「hl2 source code. Do not use it illegal.」· C头文件 代码 · 共 38 行

H
38
字号
/*----------------------------------------------------------------------
Copyright (c) 1998,1999 Gipsysoft. All Rights Reserved.
Please see the file "licence.txt" for licencing details.
File:	BufferDataSource.h
Owner:	russf@gipsysoft.com
Purpose:	A general data source from some arbitrary data pointer.
----------------------------------------------------------------------*/
#ifndef BUFFERDATASOURCE_H
#define BUFFERDATASOURCE_H

#ifndef DATASOURCEABC_H
	#include "DataSourceABC.h"
#endif	//	DATASOURCEABC_H

class CBufferDataSource : public CDataSourceABC  
{
public:
	CBufferDataSource();
	virtual ~CBufferDataSource();

	bool Open( BYTE *pbBuffer, UINT uDataLen );

	virtual bool ReadBytes( BYTE *pbBuffer, UINT uCount );
	virtual bool SetRelativePos( int n);
	virtual bool Reset();
	virtual int GetSize() const;
	virtual int GetCurrentPos() const;

protected:
	BYTE *m_pBuffer, *m_pCurrent;
	UINT m_nDataLen;

private:
	CBufferDataSource( const CBufferDataSource & );
	CBufferDataSource& operator = ( const CBufferDataSource & );
};

#endif //BUFFERDATASOURCE_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?