home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 06 General Architectures / 06 Rabin / msgroute.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-10  |  939 b   |  42 lines

  1.  
  2. /* Copyright (C) Steve Rabin, 2001. 
  3.  * All rights reserved worldwide.
  4.  *
  5.  * This software is provided "as is" without express or implied
  6.  * warranties. You may freely copy and compile this source into
  7.  * applications you distribute provided that the copyright text
  8.  * below is included in the resulting source code, for example:
  9.  * "Portions Copyright (C) Steve Rabin, 2001"
  10.  */
  11.  
  12. #ifndef __MSGROUTE_H__
  13. #define __MSGROUTE_H__
  14.  
  15. #include "msg.h"
  16. #include "global.h"
  17. #include "singleton.h"
  18. #include <list>
  19.  
  20.  
  21. typedef std::list<MSG_Object*> MessageContainer;
  22.  
  23. class MsgRoute : public Singleton <MsgRoute>
  24. {
  25. public:
  26.  
  27.     MsgRoute( void );
  28.     ~MsgRoute( void );
  29.  
  30.     void DeliverDelayedMessages( void );
  31.     void SendMsg( float delay, MSG_Name name, objectID receiver, objectID sender, int state );
  32.  
  33. private:
  34.  
  35.     MessageContainer m_delayedMessages;
  36.  
  37.     void RouteMsg( MSG_Object & msg );
  38.  
  39. };
  40.  
  41.  
  42. #endif    // __MSGROUTE_H__