Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PipeStream.h

Go to the documentation of this file.
00001 /* 00002 * This file is part of dvi2bitmap. 00003 * Copyright 2003, Council for the Central Laboratory of the Research Councils 00004 * 00005 * This program is part of the Starlink Software Distribution: see 00006 * http://www.starlink.ac.uk 00007 * 00008 * dvi2bitmap is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * dvi2bitmap is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with dvi2bitmap; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * The General Public License is distributed along with this 00023 * program in the file LICENCE. 00024 * 00025 * Author: Norman Gray <norman@astro.gla.ac.uk> 00026 * $Id: PipeStream.h,v 1.7 2003/08/06 22:34:16 norman Exp $ 00027 */ 00028 00029 #ifndef PIPE_STREAM_HEADER_READ 00030 #define PIPE_STREAM_HEADER_READ 1 00031 00032 #include <InputByteStream.h> 00033 #include <sys/types.h> 00034 00042 class PipeStream : public InputByteStream { 00043 public: 00044 PipeStream (string cmd, string envs="") 00045 throw (InputByteStreamError); 00046 ~PipeStream(); 00047 string getResult(bool allOfFile=false, bool gobbleRest=true) 00048 throw (InputByteStreamError); 00049 virtual void close(void); 00050 int getTerminationStatus(void); 00057 pid_t getPid(void) const { return pid_; }; 00058 private: 00059 int pipe_status_; 00060 pid_t pid_; 00061 const string orig_command_; 00062 }; 00063 00064 #endif /* PIPE_STREAM_HEADER_READ */

Generated on Sun Aug 21 18:21:02 2005 for dvi2bitmap by doxygen 1.3.8