Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SoundManagerMsg.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_SoundManagerMsg_h 00003 #define INCLUDED_SoundManagerMsg_h 00004 00005 class RCRegion; 00006 00007 //! A small header that preceeds data sent by SoundManager between processes 00008 struct SoundManagerMsg { 00009 private: 00010 friend class SoundManager; 00011 00012 //! the type to use when referring to Sounds 00013 typedef unsigned short Snd_ID; 00014 00015 //! Denotes what type of message this is 00016 enum MsgType { add, del, wakeup, unknown } type; 00017 00018 //! The id of the sound this is in reference to 00019 Snd_ID id; 00020 00021 //! The RCRegion to free, if it's a deletion 00022 RCRegion * region; 00023 00024 //! The serial number of the sound this is in reference to, see SoundManager::sn 00025 unsigned int sn; 00026 00027 //! constructor 00028 SoundManagerMsg() : type(unknown), id(static_cast<Snd_ID>(-1)), region(NULL), sn(-1U) {} 00029 00030 //! virtual destructor 00031 /*! doesn't do anything, but don't remove it, otherwise this would no longer be a virtual base class */ 00032 virtual ~SoundManagerMsg() {} 00033 00034 //! Accessor for the id number, set by SoundManager 00035 Snd_ID getID() const { return id; } 00036 00037 //! Sets up the header as an add message 00038 void setAdd(Snd_ID sndid, unsigned int sndsn) { 00039 type=add; 00040 id=sndid; 00041 sn=sndsn; 00042 } 00043 00044 //! Sets up the header as an erase message 00045 void setDelete(RCRegion* rcregion) { 00046 type=del; 00047 region=rcregion; 00048 } 00049 00050 //! Sets up the header as a wakeup message 00051 void setWakeup() { 00052 type=wakeup; 00053 } 00054 00055 SoundManagerMsg(const SoundManagerMsg&); //!< don't call 00056 SoundManagerMsg operator=(const SoundManagerMsg&); //!< don't call 00057 }; 00058 00059 /*! @file 00060 * @brief Defines SoundManagerMsg, a small header used by SoundManager for sending messages between processes 00061 * @author ejt (Creator) 00062 * 00063 * $Author: ejt $ 00064 * $Name: tekkotsu-2_4_1 $ 00065 * $Revision: 1.2 $ 00066 * $State: Exp $ 00067 * $Date: 2005/06/01 05:47:54 $ 00068 */ 00069 00070 #endif // INCLUDED_SoundManagerMsg_h |
Tekkotsu v2.4.1 |
Generated Tue Aug 16 16:32:49 2005 by Doxygen 1.4.4 |