www.pudn.com > DSPSample.rar > PPQ.h


// PPQ.h: interface for the PPQ class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_PPQ_H__5F702B11_0DDB_47EC_9EBD_846F959357C3__INCLUDED_) 
#define AFX_PPQ_H__5F702B11_0DDB_47EC_9EBD_846F959357C3__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
#include "DSP.h" 
#include "HGF.h" 
 
#define FILE_BUFF_SIZE	0xFFC 
#define	READ_FILE_SIZE	0xBFD 
 
class PPQ : public DSPACT   
{ 
	SELF_SERIALIZE("zzz.ghd@PPQ.DSP","PPQ",DSPACT); 
 
protected: 
	virtual bool	AttrSectRecv(BYTE byClassLevels,BYTE byAttrNo,const char* const lpBuff,DWORD dwLen,bool bLast); 
	virtual bool	AttrSectSend(BYTE byClassLevels,BYTE byAttrNo,char** const lpBuff,DWORD& dwLen,bool& bContinue); 
	virtual bool	Serialize(BYTE byClassLevels,BYTE byAttrNo,DSP::_DSPPACKET &dsp); 
	virtual bool	UnSerialize(BYTE byClassLevels,BYTE byAttrNo,DSP::_DSPPACKET &dsp,DWORD dwLen); 
//	virtual bool	Compress(char** const lpBuff,DWORD& dwLen); 
//	virtual bool	UnCompress(char** const lpBuff,DWORD dwLen,char* lpUnBuff,WORD& wUnLen,bool bStart); 
 
public: 
	PPQ(); 
	virtual ~PPQ(); 
 
	bool		m_bBool; 
	BOOL		m_bBOOL; 
	char		m_cValue; 
	BYTE		m_byValue; 
	short		m_sValue; 
	HGF			m_hgf; 
	WORD		m_wValue; 
	int			m_iValue; 
	DWORD		m_dwValue; 
	char		m_chBuff[FILE_BUFF_SIZE]; 
	std::string	m_str; 
 
	ifstream	ifs; 
	ofstream	ofs; 
	char*		m_lpbuff; 
	static DSPACT*	GetDSPObject(const std::string& strID) 
	{ 
		return (new PPQ()); 
	}; 
}; 
 
#endif // !defined(AFX_PPQ_H__5F702B11_0DDB_47EC_9EBD_846F959357C3__INCLUDED_)