47 #undef UNPLUG_HANDLERS
126 d_lib = dlopen(d_filename.c_str(), RTLD_NOW|RTLD_LOCAL);
127 BESDEBUG(
"bes",
"BESPlugin: plug in handler:" << d_filename <<
", " << d_lib << endl);
129 throw NoSuchLibrary(
string( dlerror() ), __FILE__, __LINE__ ) ;
141 BESPlugin(
const string &filename) : d_filename(filename), d_lib(0) {}
146 BESDEBUG(
"bes",
"BESPlugin: unplugging handler:" << d_filename <<
", " << d_lib << endl);
147 #ifdef UNPLUG_HANDLERS
162 void *
maker = dlsym(get_lib(),
"maker");
164 throw NoSuchObject(
string( dlerror() ), __FILE__, __LINE__ ) ;
167 typedef M *(*maker_func_ptr)();
168 maker_func_ptr my_maker = *
reinterpret_cast<maker_func_ptr*
>(&
maker);
169 M *my_M = (my_maker)();
174 virtual void dump( ostream &strm )
const
176 strm <<
"BESPlugin::dump - (" << (
void *)
this <<
")" << endl ;
177 strm <<
" plugin name: " << d_filename << endl ;
178 strm <<
" library handle: " << (
void *)d_lib << endl ;
182 #endif // T_BESPlugin_h