79 retVal = loadModules() ;
83 string newerr =
"Error during module initialization: " ;
85 cerr << newerr << endl ;
90 string newerr =
"Error during module initialization: " ;
91 newerr +=
"caught unknown exception" ;
92 cerr << newerr << endl ;
103 BESModuleApp::loadModules()
108 vector<string> vals ;
110 vector<string>::iterator l = vals.begin() ;
111 vector<string>::iterator le = vals.end() ;
115 vector<string> ordered_list ;
116 for( ; l != le; l++ )
121 if( mods.find(
"dap", 0 ) != string::npos )
123 ordered_list.insert( ordered_list.begin(), mods ) ;
127 ordered_list.push_back( mods ) ;
132 l = ordered_list.begin() ;
133 le = ordered_list.end() ;
134 for( ; l != le; l++ )
137 list<string> mod_list ;
140 list<string>::iterator i = mod_list.begin() ;
141 list<string>::iterator e = mod_list.end() ;
146 string key =
"BES.module." + (*i) ;
159 cerr <<
"couldn't find the module for " << (*i) << endl ;
163 new_mod._module_name = (*i) ;
164 new_mod._module_library = so ;
165 _module_list.push_back( new_mod ) ;
170 list< bes_module >::iterator mi = _module_list.begin() ;
171 list< bes_module >::iterator me = _module_list.end() ;
172 for( ; mi != me; mi++ )
174 bes_module curr_mod = *mi ;
175 _moduleFactory.
add_mapping( curr_mod._module_name, curr_mod._module_library ) ;
178 for( mi = _module_list.begin(); mi != me; mi++ )
180 bes_module curr_mod = *mi ;
183 string modname = curr_mod._module_name ;
190 cerr <<
"Caught plugin exception during initialization of "
191 << curr_mod._module_name <<
" module:" << endl <<
" "
198 cerr <<
"Caught unknown exception during initialization of "
199 << curr_mod._module_name <<
" module" << endl ;
219 list< bes_module >::iterator i = _module_list.begin() ;
220 list< bes_module >::iterator e = _module_list.end() ;
227 if( e == i ) done = true ;
231 bes_module curr_mod = *e ;
232 string modname = curr_mod._module_name ;
244 cerr <<
"Caught exception during module termination: "
249 cerr <<
"Caught unknown exception during terminate" << endl ;
267 << (
void *)
this <<
")" << endl ;
269 if( _module_list.size() )
273 list< bes_module >::const_iterator i = _module_list.begin() ;
274 list< bes_module >::const_iterator e = _module_list.end() ;
277 bes_module curr_mod = *i ;
279 << curr_mod._module_library << endl ;