1 #ifndef _VOTING_H_ 2 #define _VOTING_H_ 3 4 #include "base.h" 5 #include "Timer.h" 6 #include "BlockingQueue.h" 7 8 /* 9 CVote. 10 Small class to handle voting of sheep. 11 */ 12 class CVote 13 { 14 typedef struct 15 { 16 uint32 vid; 17 uint8 vtype; 18 } VotingInfo; 19 20 boost::thread *m_pThread; 21 Base::CTimer m_Timer; 22 23 Base::CBlockingQueue<VotingInfo> m_Votings; 24 25 void ThreadFunc(); 26 27 fp8 m_Clock; 28 29 public: 30 CVote(); 31 virtual ~CVote(); 32 33 bool Vote( const uint32 _id, const uint8 _type, const fp4 _duration ); 34 }; 35 36 37 38 39 #endif 40 41 42