PiecePicker.h
资源名称:GGBT.rar [点击查看]
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:
P2P编程
开发平台:
Visual C++
- // PiecePicker.h: interface for the CPiecePicker class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_)
- #define AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CPiecePicker
- {
- public:
- CPiecePicker(long lPiecesCount);
- virtual ~CPiecePicker();
- vector<long> GetResult();
- void complete(long index);
- void came_in(long index);
- void lost_have(long index);
- void got_have(long index);
- private:
- bool m_bGotany;
- long m_lPiecesCount;
- vector<vector<long> > m_vInterests;
- vector<long> m_vNumInterests;
- vector<long> m_vPosInterest;
- vector<long> m_vFixed;
- };
- void PiecePickerTest();
- #endif // !defined(AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_)