Ignore:
Timestamp:
2010-05-26T23:52:09+12:00 (14 years ago)
Author:
davidb
Message:

Further development of the os_process classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/os_process.h

    r22173 r22177  
    3333#define OS_PROCESS_H
    3434
    35  #include <stdlib.h>
     35#include <stdlib.h>
    3636
    37 enum OSProcessPipeMode { uniRead=0, uniWrite=1, biReadWrite=2, noPipe=3 };
     37enum OSProcessPipeMode   { uniRead=0, uniWrite=1, biReadWrite=2 };
     38enum OSProcessWarnStatus { withoutWarning, withWarning };
    3839
    3940class osprocess
     
    4142 
    4243 public:
    43   osprocess(char* cmdline);
    4444  osprocess(char* cmdline, OSProcessPipeMode mode);
    4545  virtual ~osprocess();
    4646 
    47   /*
    48   virtual bool eop();                  // end of pipe
    49   virtual bool eop(OSProcessPipeMode); // end of pipe, for designated pipe
     47  /* one day might want these
     48  virtual bool end_of_pipe(); 
     49  virtual bool end_of_read_pipe();
     50  virtual bool end_of_write_pipe();
    5051  */
    5152
    52   virtual int write(char* buffer, const int buffer_len);
    53   virtual int read(char* buffer, const int buffer_len);
     53  virtual int write(char* buffer, const int buffer_len)=0;
     54  virtual int read(char* buffer, const int buffer_len)=0;
    5455 
     56  virtual bool close_write_pipe(OSProcessWarnStatus warn_status=withWarning)=0;
     57  virtual bool close_read_pipe(OSProcessWarnStatus warn_status=withWarning)=0;
    5558  virtual bool close();
    56   virtual bool close(OSProcessPipeMode mode);
     59
    5760 
    5861 protected:
    5962  OSProcessPipeMode mode_;
    60   bool read_pipe_open_;
    61   bool write_pipe_open_;
    6263
    6364};
Note: See TracChangeset for help on using the changeset viewer.