// ShortFrame2.cc // // // This framework has no ELdestControls so it should attach one to "cout" // automatically // // #include "ErrorLogger/ELadministrator.h" #include "ErrorLogger/ErrorObj.h" ZM_USING_NAMESPACE( zmel ) #include "ShortFrame2.h" #include "SampleEvent.h" #include "ShortModule.h" #include "ZMutility/iostream" USING( std::cout ) int main() { ShortFrame2 framework; framework.SetupAndRun(); return 0; } ShortFrame2::ShortFrame2(){ step = new ShortModule("Short"); } ShortFrame2::~ShortFrame2(){ delete step; } void ShortFrame2::SetupAndRun(){ logger = ELadministrator::instance(); ErrorObj msg(ELerror, "myMsg"); errlog(msg); //This is the first message to be logged Event event; event.datum = 0; ERRLOGTO(errlog, ELsuccess, "Starting up.") << endmsg; // $$ 2:4 msg << "Invoke() being called once\n"; step->invoke(event); msg << "Invoke() finished\n"; errlog(ELzeroSeverity, "Finished module.") << endmsg; cout << "The following log is to an ErrorObj:\n"; errlog(msg); errlog(ELabort, "AbortThreshold Test") << endmsg; // $$ 14:3 errlog(ELinfo,"") << "If you're reading this then the program didn't abort!" << "(or you're looking @ my code)" << endmsg; } #include "ShortModule.cc"