本文整理汇总了C++中IPlugin::getProvidingHookPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ IPlugin::getProvidingHookPoints方法的具体用法?C++ IPlugin::getProvidingHookPoints怎么用?C++ IPlugin::getProvidingHookPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlugin
的用法示例。
在下文中一共展示了IPlugin::getProvidingHookPoints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: plugindir
void sentry::Sentry::loadPlugins(){
string plugindir(_config->getValue("application", "plugindir"));
if(plugindir.empty()){
Logger::log("Plugin directory not in config.", Logger::LOG_FATAL);
exit(Sentry::EXIT_NO_PLUGIN_DIR);
}else{
plugindir += "/";
}
vector<string> files = _getPluginLibNames(plugindir);
/**
* Load the plug-ins
*/
for(unsigned int i = 0; i < files.size(); i++){
try{
string pluginfile = files.at(i);
IPlugin* plugin = PluginLoader::loadPlugin(pluginfile, this);
if(plugin != 0){
_plugins[plugin->getName()] = plugin;
_pluginpathmap[plugin->getName()] = pluginfile;
vector<IHookPoint*> hookpoints = plugin->getProvidingHookPoints();
for(int h = 0; h < hookpoints.size(); h++){
IHookPoint* hookpoint = hookpoints.at(h);
if( findHookPoint(hookpoint->getName()) == 0 ){
_hookpoints[hookpoint->getName()] = hookpoint;
}else{
Logger::log("Ignoring already available hookpoint " + hookpoint->getName(), Logger::LOG_WARNING);
}
}
}
}
catch(NoSuchLibraryException& nsle){
Logger::log(nsle.what(), Logger::LOG_ERROR);
}
catch(NoSuchSymbolException& nsse){
Logger::log(nsse.what(), Logger::LOG_ERROR);
}
}
this->_activatePlugins();
}