Example for testing inter-process communication.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include "JSystem/JProcess.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char *argv[]) | 
|   | 
Example for testing inter-process communication. 
- Author
 - mdejong 
 
Definition in file JProcess.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char *  | 
          argv[]  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 18 of file JProcess.cc.
   28     JParser<> zap(
"Example for testing inter-process communication.");
 
   36   catch(
const exception &error) {
 
   37     FATAL(error.what() << endl);
 
   46     JProcess process(command);
 
   50       istream in(process.getInputStreamBuffer());
 
   52       for (
string buffer; 
getline(in, buffer); ) {
 
   53         cout << buffer << endl;
 
   58       ostream out(process.getOutputStreamBuffer());
 
   59       istream in (process.getInputStreamBuffer());
 
   61       for (
string buffer; 
getline(cin, buffer) && buffer != 
""; ) {
 
   63         out  << buffer << endl;
 
   68           reverse(buffer.begin(), buffer.end());
 
   71         cout << buffer << endl;
 
   75   catch(
const JException& error) {
 
   76     cerr << error.what() << endl;
 
Utility class to parse command line options. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.