Go to the documentation of this file.00001 #ifndef __PROCESS_ABSTRACTION_H__
00002 #define __PROCESS_ABSTRACTION_H__
00003
00004 #include <utilities/exception.h>
00005 #include <utilities/testing_utilities.h>
00006
00007 #if !defined( WIN32_PLATFORM ) && !defined( NIX_PLATFORM ) && !defined( MINGW_PLATFORM ) && !defined( CYGWIN_PLATFORM )
00008 #define WIN32_PLATFORM
00009 #endif
00010
00011 #ifdef PROCESS_ABSTRACTION
00012 #if defined( WIN32_PLATFORM ) || defined( MINGW_PLATFORM ) || defined( CYGWIN_PLATFORM )
00013 #define PROCESS_ABSTRACTION_DLL_ENTITY __declspec( dllexport )
00014 #endif
00015
00016 #if defined( NIX_PLATFORM )
00017 #define PROCESS_ABSTRACTION_DLL_ENTITY
00018 #endif
00019 #else
00020 #ifdef WIN32_PLATFORM
00021 #define PROCESS_ABSTRACTION_DLL_ENTITY __declspec( dllimport )
00022 #pragma comment( lib , "process_abstraction.lib" )
00023 #endif
00024
00025 #if defined( CYGWIN_PLATFORM ) || defined( MINGW_PLATFORM )
00026 #define PROCESS_ABSTRACTION_DLL_ENTITY __declspec( dllimport )
00027 #endif
00028
00029 #if defined( NIX_PLATFORM )
00030 #define PROCESS_ABSTRACTION_DLL_ENTITY
00031 #endif
00032 #endif
00033
00034 namespace nitro
00035 {
00048 class PROCESS_ABSTRACTION_DLL_ENTITY ProcessAbstraction{
00049
00050 public:
00051
00066 ProcessAbstraction( void );
00067
00094 void CreateProcess( const char * Command , const char * argv [] = NULL );
00095
00096 ALIAS_FUNCTION_2( CreateProcess , aliasCreateProcess , const char * , const char * * );
00097
00124 void CreateProcess( const std::string & Command , const char * argv [] = NULL );
00125
00140 void Wait( void );
00141
00156 void TerminateProcess( void );
00157
00176 virtual ~ProcessAbstraction();
00177
00178 private:
00179
00194 ProcessAbstraction( const ProcessAbstraction & );
00195
00210 ProcessAbstraction operator=( const ProcessAbstraction & );
00211
00226 void * ProcessHandle;
00227
00228 };
00229
00230 }
00231
00232 #endif