Example program to test shell I/O (class JSYSTEM::JShell).
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "JSystem/JShell.hh"
#include "JSystem/JSystemToolkit.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 shell I/O (class JSYSTEM::JShell).
- Author
- mdejong
Definition in file JShell.cc.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 19 of file JShell.cc.
27 JParser<> zap(
"Example program to test shell I/O.");
33 catch(
const exception &error) {
34 FATAL(error.what() << endl);
42 for (
string buffer; shell; ) {
44 cout <<
"> " << flush;
48 if (buffer !=
"" && buffer !=
"exit") {
50 shell << buffer << endl;
53 cout << buffer << endl;
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
The JShell clas can be used to interact with the shell via I/O streams.
bool getline(std::string &buffer, const char eol='\n')
Get line of text.
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).