Collaboration diagram for vrj::Callable:

Public Member Functions | |
| Callable (vrj::PerformanceMediator *mgr) | |
| bool | operator() (void *func) |
| This will be invoked as a callback by methods of vpr::LibraryLoader. | |
Public Attributes | |
| vrj::PerformanceMediator * | med |
An instance can be passed in where a boost::function1<bool, void*> is expected. In vrj:PerformanceMediator::loadPerfPlugin(), instances are used to handle dynamic loading of plug-ins via vpr::LibraryLoader.
Definition at line 80 of file PerformanceMediator.cpp.
| vrj::Callable::Callable | ( | vrj::PerformanceMediator * | mgr | ) | [inline] |
| bool vrj::Callable::operator() | ( | void * | func | ) | [inline] |
This will be invoked as a callback by methods of vpr::LibraryLoader.
| func | A function pointer for the entry point in a dynamically loaded plug-in. This must be cast to the correct signature before being invoked. |
Definition at line 93 of file PerformanceMediator.cpp.
References med.
00094 { 00095 vrj::PerfPlugin* (*init_func)(vrj::PerformanceMediator* mediator, jccl::ConfigManager* configMgr); 00096 00097 // Cast the entry point function to the correct signature so that we can 00098 // call it. All dynamically plug-ins must have an entry point function 00099 // that takes no argument and returns a pointer to an implementation of 00100 // the vrj::RemoteReconfig interface. 00101 init_func = (vrj::PerfPlugin* (*)(vrj::PerformanceMediator*, jccl::ConfigManager*)) func; 00102 00103 jccl::ConfigManager* mgr = jccl::ConfigManager::instance(); 00104 00105 // Call the entry point function. 00106 vrj::PerfPlugin* plugin = (*init_func)(med, mgr); 00107 00108 if ( NULL != plugin ) 00109 { 00110 med->setPerfPlugin(plugin); 00111 return true; 00112 } 00113 else 00114 { 00115 return false; 00116 } 00117 }
1.5.1