35 lines
		
	
	
		
			838 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			838 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| // execp.h; trattasi di -*-c++-*-
 | |
| // fv 6/10/93
 | |
| 
 | |
| #ifndef __EXECP_H
 | |
| #define __EXECP_H
 | |
| 
 | |
| #ifndef __OBJECT_H
 | |
| #include <object.h>
 | |
| #endif
 | |
| 
 | |
| // Class for external object execution with optional background
 | |
| // exec under UNIX and swap on EMS under DOS
 | |
| // Manages restoring the XVT status
 | |
| // No command line is implemented; user is supposed to use the
 | |
| // mailbox for this
 | |
| 
 | |
| class TExternal_app : public TObject
 | |
| {
 | |
|   const char* _path;    // app name (must be allocated by user)
 | |
|   int  _error;          // last error (errno code)
 | |
|   int  _exitcode;       // last exit code
 | |
|   int  _count;          // count of calls
 | |
| 
 | |
| public:
 | |
|   bool can_run() const;
 | |
|   int run(bool async = FALSE, bool user = TRUE);
 | |
|   int error()    { return _error;};
 | |
|   int exitcode() { return _exitcode;};
 | |
|   int count()    { return _count; };
 | |
| 
 | |
|   TExternal_app(const char* p);
 | |
| };
 | |
| 
 | |
| #endif
 |