PiecePicker.h
上传用户:lds876
上传日期:2013-05-25
资源大小:567k
文件大小:1k
源码类别:

P2P编程

开发平台:

Visual C++

  1. // PiecePicker.h: interface for the CPiecePicker class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_)
  5. #define AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CPiecePicker  
  10. {
  11. public:
  12. CPiecePicker(long lPiecesCount);
  13. virtual ~CPiecePicker();
  14. vector<long> GetResult();
  15. void complete(long index);
  16. void came_in(long index);
  17. void lost_have(long index);
  18. void got_have(long index);
  19. private:
  20. bool m_bGotany;
  21. long m_lPiecesCount;
  22. vector<vector<long> > m_vInterests;
  23. vector<long> m_vNumInterests;
  24. vector<long> m_vPosInterest;
  25. vector<long> m_vFixed;
  26. };
  27. void PiecePickerTest();
  28. #endif // !defined(AFX_PIECEPICKER_H__DC9FDD17_2C7D_48A4_BDCD_5BC267D421DE__INCLUDED_)