MMatchShutdown.h
00001 #pragma once 00002 00003 00004 #include <vector> 00005 using namespace std; 00006 00007 00008 class MShutdownNotify { 00009 protected: 00010 unsigned short m_nDelay; 00011 char m_szMessage[128]; 00012 public: 00013 MShutdownNotify(unsigned short nDelay, const char* pszMsg) { 00014 m_nDelay = nDelay; 00015 strcpy(m_szMessage, pszMsg); 00016 } 00017 virtual ~MShutdownNotify() {} 00018 00019 unsigned short GetDelay() { return m_nDelay; } 00020 char* GetString() { return m_szMessage; } 00021 }; 00022 00023 class MMatchShutdown { 00024 protected: 00025 vector<MShutdownNotify*> m_ShutdownNotifyArray; 00026 00027 bool m_bShutdown; 00028 unsigned short m_nProgressIndex; 00029 unsigned long m_nTimeLastProgress; 00030 00031 unsigned short GetProgressIndex() { return m_nProgressIndex; } 00032 unsigned long GetTimeLastProgress() { return m_nTimeLastProgress; } 00033 void MMatchShutdown::SetProgress(int nIndex, unsigned long nClock); 00034 00035 public: 00036 MMatchShutdown() { m_bShutdown = false; } 00037 virtual ~MMatchShutdown(); 00038 00039 bool LoadXML_ShutdownNotify(const char* pszFileName); 00040 00041 void Start(unsigned long nClock); 00042 void Notify(int nIndex); 00043 void Terminate(); 00044 00045 bool IsShutdown() { return m_bShutdown; } 00046 00047 void OnRun(unsigned long nClock); 00048 };
MAIET entertainment