Example program to test JANG::JFileSream and JLANG::JNullStream classes.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JLang/JFileStream.hh"
#include "JLang/JNullStream.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Example program to test JANG::JFileSream and JLANG::JNullStream classes.
- Author
- mdejong
Definition in file JNullStream.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 19 of file JNullStream.cc.
30 JParser<> zap(
"Example program to test file streaming.");
38 catch(
const exception &error) {
39 FATAL(error.what() << endl);
43 JFileInputStream
is(STDIN_FILENO);
44 JFileOutputStream os(STDOUT_FILENO);
46 istream
in (use_cin ? cin .rdbuf() :
is.rdbuf());
47 ostream out(use_cout ? cout.rdbuf() : os.rdbuf());
58 cout <<
"out -> <" << flush; out << buffer << flush; cout <<
">" << endl;
59 cout <<
"null -> <" << flush;
null << buffer << flush; cout <<
">" << 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.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null