Example program to test JLANG::JWhiteSpacesFacet class.
More...
#include <string>
#include <iostream>
#include <fstream>
#include <locale>
#include <iomanip>
#include "JLang/JWhiteSpacesFacet.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 JLANG::JWhiteSpacesFacet class.
- Author
- mdejong
Definition in file JWhiteSpacesFacet.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 20 of file JWhiteSpacesFacet.cc.
30 JParser<> zap(
"Example program to test white spaces handling using facet.");
38 catch(
const exception &error) {
39 FATAL(error.what() << endl);
46 if (inputFile ==
"") {
50 cout <<
"> " << flush;
58 istringstream
is(buffer);
60 const locale
loc(
is.getloc(),
new JWhiteSpacesFacet(
is.getloc(), ws));
64 for (
string key;
is >> key; ) {
75 ifstream
in(inputFile.c_str());
77 in.imbue(locale(
in.getloc(),
new JWhiteSpacesFacet(
in.getloc(), ws)));
79 for (
string key;
in >> key; ) {
Utility class to parse command line options.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
#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.