#include #include #include #include "JLang/JTypeList.hh" #include "JLang/JObjectWriter.hh" #include "JLang/JASCIIFileWriter.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Example program to test JLANG::JObjectWriter class. * \author mdejong */ int main(int argc, char **argv) { using namespace std; string outputFile; int debug; try { JParser<> zap("Example program to test object writing class."); zap['o'] = make_field(outputFile); zap['d'] = make_field(debug) = 0; zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } using namespace JPP; typedef JTypeList > JTypelist_t; JAccessibleObjectWriter out; out.reset(new JASCIIFileWriter(outputFile.c_str(), "\n")); out.put(1); out.put("noot"); out.put(3); out.close(); }