Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Process.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_Process_h_
00003 #define INCLUDED_Process_h_
00004 
00005 #include "IPC/ProcessID.h"
00006 #include <string>
00007 
00008 class RCRegion;
00009 
00010 //! Represents a common interface for each process being run
00011 class Process {
00012 public:
00013   Process(ProcessID::ProcessID_t pid, const std::string& pname);
00014   virtual ~Process();
00015   virtual void DoStart() {}
00016   virtual void DoStop() {}
00017   virtual void run();
00018 
00019   static const char* getName() { return ProcessID::getIDStr(); }
00020   static Process * getCurrent() { return procs[ProcessID::getID()]; }
00021   
00022   virtual void statusReport(std::ostream& os);
00023   static bool statusReport(RCRegion* msg);
00024 
00025 protected:
00026   static Process* procs[ProcessID::NumProcesses];
00027   
00028 private:
00029   Process(const Process&);            //!< don't call
00030   Process& operator=(const Process&); //!< don't call
00031 };
00032 
00033 /*! @file
00034  * @brief 
00035  * @author ejt (Creator)
00036  *
00037  * $Author: ejt $
00038  * $Name: tekkotsu-4_0 $
00039  * $Revision: 1.1 $
00040  * $State: Exp $
00041  * $Date: 2007/06/14 15:37:42 $
00042  */
00043 
00044 #endif

Tekkotsu Hardware Abstraction Layer 4.0
Generated Thu Nov 22 01:00:53 2007 by Doxygen 1.5.4