00001 // OPENDAP_CLASSModule.cc 00002 00003 #include <iostream> 00004 00005 using std::endl ; 00006 00007 #include "OPENDAP_CLASSModule.h" 00008 #include "BESRequestHandlerList.h" 00009 #include "OPENDAP_CLASSRequestHandler.h" 00010 #include "BESDebug.h" 00011 #include "BESResponseHandlerList.h" 00012 #include "BESResponseNames.h" 00013 #include "BESCommand.h" 00014 #include "OPENDAP_CLASSResponseNames.h" 00015 00016 void 00017 OPENDAP_CLASSModule::initialize( const string &modname ) 00018 { 00019 BESDEBUG( modname, "Initializing OPENDAP_CLASS Module " << modname << endl ) 00020 00021 BESDEBUG( modname, " adding " << modname << " request handler" << endl ) 00022 BESRequestHandlerList::TheList()->add_handler( modname, new OPENDAP_CLASSRequestHandler( modname ) ) ; 00023 00024 // If new commands are needed, then let's declare this once here. If 00025 // not, then you can remove this line. 00026 string cmd_name ; 00027 00028 // INIT_END 00029 BESDEBUG( modname, " adding OPENDAP_CLASS debug context" << endl ) 00030 BESDebug::Register( modname ) ; 00031 00032 BESDEBUG( modname, "Done Initializing OPENDAP_CLASS Module " << modname << endl ) 00033 } 00034 00035 void 00036 OPENDAP_CLASSModule::terminate( const string &modname ) 00037 { 00038 BESDEBUG( modname, "Cleaning OPENDAP_CLASS module " << modname << endl ) 00039 00040 BESDEBUG( modname, " removing " << modname << " request handler" << endl ) 00041 BESRequestHandler *rh = BESRequestHandlerList::TheList()->remove_handler( modname ) ; 00042 if( rh ) delete rh ; 00043 00044 // If new commands are needed, then let's declare this once here. If 00045 // not, then you can remove this line. 00046 string cmd_name ; 00047 00048 // TERM_END 00049 BESDEBUG( modname, "Done Cleaning OPENDAP_CLASS module " << modname << endl ) 00050 } 00051 00052 extern "C" 00053 { 00054 BESAbstractModule *maker() 00055 { 00056 return new OPENDAP_CLASSModule ; 00057 } 00058 } 00059 00060 void 00061 OPENDAP_CLASSModule::dump( ostream &strm ) const 00062 { 00063 strm << BESIndent::LMarg << "OPENDAP_CLASSModule::dump - (" 00064 << (void *)this << ")" << endl ; 00065 } 00066