#include #include #include #include "JLang/JObjectReader.hh" #include "JLang/JASCIIFileReader.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to test JLANG::JObjectReader class. * \author mdejong */ int main(int argc, char **argv) { using namespace std; string inputFile; int debug; try { JParser<> zap("Example program to test object reading."); zap['f'] = make_field(inputFile); zap['d'] = make_field(debug) = 0; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } using namespace JPP; typedef std::string JType_t; JAccessibleObjectReader in; in.reset(new JASCIIFileReader()); in.open(inputFile.c_str()); while (in.hasNext()) { cout << *(in.next()) << endl; } in.close(); }