// -*- c++ -*- // Generated by assa-genesis //------------------------------------------------------------------------------ // $Id: HelloWorld.cpp,v 1.6 2006/07/20 02:30:54 vlg Exp $ //------------------------------------------------------------------------------ // HelloWorld.cpp //------------------------------------------------------------------------------ // Copyright (c) YEAR by YOUR-NAME // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version // 2 of the License, or (at your option) any later version. //------------------------------------------------------------------------------ // // Date : Fri Apr 4 17:01:53 2003 // //------------------------------------------------------------------------------ #include #include "HelloWorld-main.h" #include "HelloWorld.h" // Static declarations mandated by Singleton class ASSA_DECL_SINGLETON(HelloWorld); HelloWorld:: HelloWorld () : m_greeting_message ("Hello, World!") { // Add a new command-line argument add_opt ('a', "greeting-message", &m_greeting_message); // Following list removes all predefined options. // Remove only those that you won't use. // Don't forget to update your help message in 'main.cpp'! // // ---Configuration--- rm_opt ('f', "config-file" ); rm_opt ('n', "instance" ); rm_opt ('p', "port" ); // ---Process bookkeeping--- rm_opt ('b', "daemon" ); rm_opt ('l', "pidfile" ); rm_opt ('L', "ommit-pidfile"); /*--- * By defauil disable all debugging *---*/ m_mask = ASSA::APP | ASSA::ASSAERR; m_log_file = "HelloWorld.log"; } void HelloWorld:: init_service () { trace("HelloWorld::init_service"); // // Insert initialization code here // DL((ASSA::APP,"Service has been initialized\n")); } void HelloWorld:: process_events () { trace("HelloWorld::process_events"); std::cout << m_greeting_message << std::endl; // Shut the service down m_reactor.stopReactor (); DL((ASSA::APP,"Service stopped!\n")); }