47 #undef UNPLUG_HANDLERS
128 d_lib = dlopen(d_filename.c_str(), RTLD_NOW | RTLD_GLOBAL);
129 BESDEBUG(
"bes",
"BESPlugin: plug in handler:" << d_filename <<
", " << d_lib << endl);
144 d_filename(filename), d_lib(0)
152 BESDEBUG(
"bes",
"BESPlugin: unplugging handler:" << d_filename <<
", " << d_lib << endl);
153 #ifdef UNPLUG_HANDLERS
169 void *
maker = dlsym(get_lib(),
"maker");
171 throw NoSuchObject(
string(dlerror()), __FILE__, __LINE__);
174 typedef M *(*maker_func_ptr)();
175 maker_func_ptr my_maker = *
reinterpret_cast<maker_func_ptr*
>(&
maker);
176 M *my_M = (my_maker)();
181 virtual void dump(ostream &strm)
const
183 strm <<
"BESPlugin::dump - (" << (
void *)
this <<
")" << endl;
184 strm <<
" plugin name: " << d_filename << endl;
185 strm <<
" library handle: " << (
void *) d_lib << endl;
189 #endif // T_BESPlugin_h