Homepage Demos Overview Downloads Tutorials Reference
Credits

ProcessID.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_ProcessID_h_
00003 #define INCLUDED_ProcessID_h_
00004 
00005 //! this is a class instead of a namespace so i can limit write access of the ID value to the OObjects
00006 class ProcessID {
00007 public:
00008   //! Holds ID number for each process
00009   enum ProcessID_t {
00010     MainProcess,   //!< MainObj process
00011     MotionProcess, //!< MotoObj process
00012     SoundProcess,  //!< SoundPlay process
00013     NumProcesses   //!< count of processes
00014   };
00015   
00016   static ProcessID_t getID() { return ID; }  //!< returns process's ID number, or if within a virtual function on a shared object, the process which created it (annoying)
00017   
00018 private:
00019   friend class MMCombo; //!< so that it can set the ID during init
00020   friend class SoundPlay; //!< so that it can set the ID during init
00021   static void setID(ProcessID_t id) { ID=id; } //!< sets the ID during init
00022   static ProcessID_t ID; //!< holds ID number
00023 };
00024 
00025 /*! @file
00026  * @brief Defines ProcessID - simple little global for checking which process is currently running, kind of. (see ProcessID::getID() )
00027  * @author ejt (Creator)
00028  *
00029  * $Author: ejt $
00030  * $Name: tekkotsu-2_2 $
00031  * $Revision: 1.3 $
00032  * $State: Rel $
00033  * $Date: 2003/09/25 15:31:53 $
00034  */
00035 
00036 #endif

Tekkotsu v2.2
Generated Tue Oct 19 14:19:15 2004 by Doxygen 1.3.9.1