当前位置: 首页>>代码示例>>C++>>正文


C++ PluginInfo类代码示例

本文整理汇总了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);
		}
	}
}
开发者ID:wang-bin,项目名称:Miam-Player,代码行数:33,代码来源:pluginmanager.cpp

示例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();
}
开发者ID:05storm26,项目名称:codelite,代码行数:30,代码来源:pluginmgrdlg.cpp

示例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));
}
开发者ID:05storm26,项目名称:codelite,代码行数:7,代码来源:plugindata.cpp

示例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);
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例5: loaded

bool PluginFactory::loaded( const PluginInfoPair& pair )
{
    PluginInfo *pluginInfo = pair.first;
    if( !pluginInfo ) return false;

    return pluginInfo->get();
}
开发者ID:nightfly19,项目名称:renyang-learn,代码行数:7,代码来源:pluginfactory.cpp

示例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); }
}
开发者ID:Andais,项目名称:dmz,代码行数:18,代码来源:dmzRuntimeMessaging.cpp

示例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);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例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;
}
开发者ID:AndrianDTR,项目名称:codelite,代码行数:8,代码来源:databaseexplorer.cpp

示例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;
}
开发者ID:rupinder,项目名称:GNU-MyServer-GSoC,代码行数:12,代码来源:plugins_manager.cpp

示例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;
}
开发者ID:FerencYAO,项目名称:codelite,代码行数:9,代码来源:memcheck.cpp

示例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;
}
开发者ID:nanolion,项目名称:codelite,代码行数:9,代码来源:tweaks.cpp

示例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;
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:9,代码来源:cscope.cpp

示例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;
}
开发者ID:capturePointer,项目名称:codelite,代码行数:9,代码来源:outline.cpp

示例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;
}
开发者ID:292388900,项目名称:codelite,代码行数:9,代码来源:cscope.cpp

示例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;
}
开发者ID:raresp,项目名称:codelite,代码行数:9,代码来源:LLDBPlugin.cpp


注:本文中的PluginInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。