#ifndef FMESPAWNER_H #define FMESPAWNER_H /*============================================================================ Name : spawner.cpp System : Safe GUI Language : C++ Purpose : Declaration of 'FmeSpawner' class Author Date Changes made ------------------ ------------ ------------------------------- Dale Lutz Jan 26, 1996 Original definition Matt Adam Nov 5, 1999 OOPized the functions into a class Copyright (c) 1994 - 1996, Safe Software Inc. All Rights Reserved This software may not be copied or reproduced, in all or in part, without the prior written consent of Safe Software Inc. The entire risk as to the results and performance of the software, supporting text and other information contained in this file (collectively called the "Software") is with the user. Although Safe Software Incorporated has used considerable efforts in preparing the Software, Safe Software Incorporated does not warrant the accuracy or completeness of the Software. In no event will Safe Software Incorporated be liable for damages, including loss of profits or consequential damages, arising out of the use of the Software. Overview: ========== This class spawns an FME process and tracks pipes in and out of it to get error/information messages. ============================================================================ */ const int kLineBufSize = 50000; class FmeSpawner { public: FmeSpawner(); int start(const char* command, const char *execDir); int getLine(char* buf, int len); int end(); int abort(); protected: int inputFileNumber_; HANDLE processHandle_; HANDLE wrfd_[2]; HANDLE rdfd_[2]; char lineBuffer_[kLineBufSize]; int lineBufPos_; // holds the place to put the next character }; #endif