本文整理汇总了C++中PluginInfo类的典型用法代码示例。如果您正苦于以下问题:C++ PluginInfo类的具体用法?C++ PluginInfo怎么用?C++ PluginInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PluginInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QDir
void PluginManager::init()
{
QDir appDirPath = QDir(qApp->applicationDirPath());
QString pluginPath;
if (appDirPath.cd("plugins")) {
pluginPath = appDirPath.absolutePath();
}
if (!pluginPath.isEmpty()) {
QDirIterator it(pluginPath);
SettingsPrivate *settings = SettingsPrivate::instance();
QMap<QString, PluginInfo> plugins = settings->plugins();
QStringList failedPlugins;
while (it.hasNext()) {
if (QLibrary::isLibrary(it.next()) && !it.fileInfo().isSymLink()) {
// If plugin was recognized by the App at least once
if (plugins.contains(it.filePath())) {
PluginInfo pluginInfo = plugins.value(it.filePath());
if (pluginInfo.isEnabled() && !this->loadPlugin(it.filePath())) {
failedPlugins << it.fileName();
}
} else if (!this->loadPlugin(it.filePath())) {
failedPlugins << it.fileName();
}
}
}
// If at least one plugin wasn't restored (API has changed for example)
if (!failedPlugins.isEmpty()) {
this->alertUser(failedPlugins);
}
}
}
示例2: conf
void PluginMgrDlg::Initialize()
{
clConfig conf("plugins.conf");
PluginInfoArray plugins;
conf.ReadItem(&plugins);
m_initialDisabledPlugins = plugins.GetDisabledPlugins();
std::sort(m_initialDisabledPlugins.begin(), m_initialDisabledPlugins.end());
const PluginInfo::PluginMap_t& pluginsMap = plugins.GetPlugins();
// Clear the list
m_checkListPluginsList->Clear();
PluginInfo::PluginMap_t::const_iterator iter = pluginsMap.begin();
for(; iter != pluginsMap.end(); ++iter) {
PluginInfo info = iter->second;
int item = m_checkListPluginsList->Append(info.GetName());
if(item != wxNOT_FOUND) {
m_checkListPluginsList->Check((unsigned int)item, plugins.CanLoad(info.GetName()));
}
}
if(m_checkListPluginsList->IsEmpty() == false) {
m_checkListPluginsList->Select(0);
CreateInfoPage(0);
}
m_checkListPluginsList->SetFocus();
}
示例3: AddPlugin
void PluginInfoArray::AddPlugin(const PluginInfo& plugin)
{
if ( m_plugins.count(plugin.GetName()) )
m_plugins.erase(plugin.GetName());
m_plugins.insert(std::make_pair(plugin.GetName(), plugin));
}
示例4: init_logline_generator
static void
init_logline_generator(GPtrArray *plugin_array)
{
if (!plugin_array)
return;
gboolean require_framing = FALSE;
for (int i=0; i < plugin_array->len; i++)
{
PluginInfo *plugin = g_ptr_array_index(plugin_array,i);
if (!plugin)
continue;
/* check if any active plugin requires framing */
if (plugin->require_framing && plugin->is_plugin_activated())
{
require_framing = TRUE;
break;
}
}
int framing;
if (syslog_proto && !noframing)
framing = 1;
else if (!syslog_proto && require_framing && !noframing)
framing = 1;
else
framing = 0;
prepare_log_line_template(
syslog_proto,
framing,
global_plugin_option.message_length,
sdata_value);
}
示例5: loaded
bool PluginFactory::loaded( const PluginInfoPair& pair )
{
PluginInfo *pluginInfo = pair.first;
if( !pluginInfo ) return false;
return pluginInfo->get();
}
示例6: MessageObserverState
/*!
\brief PluginInfo constructor.
\param[in] Info PluginInfo used for setting the observers name, handle, and runtime
context.
\note This constructor is intended for Plugins that wish to receive messages.
The observer will have the same name and runtime handle as the plugin using this
constructor.
*/
dmz::MessageObserver::MessageObserver (const PluginInfo &Info) :
_msgObsState (*(new MessageObserverState (
Info.get_handle (),
Info.get_name (),
Info.get_context ()))) {
if (_msgObsState.context) { _msgObsState.context->add_observer (*this); }
}
示例7: value
/** Disable a previously registered plugin (so it still can be listed in options). */
void SettingsPrivate::disablePlugin(const QString &absFilePath)
{
QMap<QString, QVariant> map = value("plugins").toMap();
PluginInfo pluginInfo = map.value(absFilePath).value<PluginInfo>();
pluginInfo.setEnabled(false);
map.insert(absFilePath, QVariant::fromValue(pluginInfo));
this->setValue("plugins", map);
}
示例8: GetPluginInfo
extern "C" EXPORT PluginInfo GetPluginInfo() {
PluginInfo info;
info.SetAuthor(wxT("Peter Janků, Michal Bližňák, Tomas Bata University in Zlin, Czech Republic (www.fai.utb.cz)"));
info.SetName(_("DatabaseExplorer"));
info.SetDescription(_("DatabaseExplorer for CodeLite"));
info.SetVersion(DBE_VERSION);
return info;
}
示例9:
/*!
Get a plugin trough its name plugin.
\param name The plugin name.
*/
Plugin*
PluginsManager::getPlugin (string &name)
{
PluginInfo* info = pluginsInfos.get (name);
if (info)
return info->getPlugin ();
return NULL;
}
示例10: GetPluginInfo
CL_PLUGIN_API PluginInfo GetPluginInfo()
{
PluginInfo info;
info.SetAuthor(wxT("pavel.iqx"));
info.SetName(wxT("MemCheck"));
info.SetDescription(_("MemCheck plugin detects memory leaks. Uses Valgrind (memcheck tool) as backend."));
info.SetVersion(wxT("0.5"));
return info;
}
示例11: GetPluginInfo
CL_PLUGIN_API PluginInfo* GetPluginInfo()
{
static PluginInfo info;
info.SetAuthor(wxT("eran"));
info.SetName(wxT("Tweaks"));
info.SetDescription(_("Tweak codelite"));
info.SetVersion(wxT("v1.0"));
return &info;
}
示例12: GetPluginInfo
extern "C" EXPORT PluginInfo GetPluginInfo()
{
PluginInfo info;
info.SetAuthor(wxT("Eran Ifrah, patched by Stefan Roesch"));
info.SetName(CSCOPE_NAME);
info.SetDescription(wxT("CScope Integration for EmbeddedLite"));
info.SetVersion(wxT("v1.1"));
return info;
}
示例13: GetPluginInfo
extern "C" EXPORT PluginInfo GetPluginInfo()
{
PluginInfo info;
info.SetAuthor(wxT("Eran Ifrah"));
info.SetName(wxT("Outline"));
info.SetDescription(_("Show Current the Layout of the current file"));
info.SetVersion(wxT("v1.0"));
return info;
}
示例14: GetPluginInfo
CL_PLUGIN_API PluginInfo* GetPluginInfo()
{
static PluginInfo info;
info.SetAuthor(wxT("Eran Ifrah, patched by Stefan Roesch"));
info.SetName(CSCOPE_NAME);
info.SetDescription(_("CScope Integration for CodeLite"));
info.SetVersion(wxT("v1.1"));
return &info;
}
示例15: GetPluginInfo
extern "C" EXPORT PluginInfo GetPluginInfo()
{
PluginInfo info;
info.SetAuthor(wxT("eran"));
info.SetName(wxT("LLDBDebuggerPlugin"));
info.SetDescription(wxT("LLDB Debugger for CodeLite"));
info.SetVersion(wxT("v1.0"));
return info;
}