00001 #ifndef Impala_Process_ManagerFactory_h 00002 #define Impala_Process_ManagerFactory_h 00003 00004 #include "Process/Manager.h" 00005 00006 #ifdef unix 00007 #include "Process/Manager4Posix.h" 00008 #else 00009 #include "Process/Manager4Windows.h" 00010 #endif 00011 00012 namespace Impala 00013 { 00014 namespace Process 00015 { 00016 00017 /************************************************************************ 00018 This class provides transparency for process management implementation. 00019 ************************************************************************/ 00020 00021 class ManagerFactory 00022 { 00023 00024 public: 00025 00026 // The requester assumes responsibility for the object created. 00027 static Manager* Create() 00028 { 00029 #ifdef unix 00030 return new Process::Manager4Posix(); 00031 #else 00032 return new Process::Manager4Windows(); 00033 #endif 00034 } 00035 00036 private: 00037 00038 ManagerFactory(); 00039 00040 virtual ~ManagerFactory(); 00041 00042 }; // class 00043 00044 } // namespace 00045 } // namespace 00046 00047 #endif