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


C++ PluginInfo::getName方法代码示例

本文整理汇总了C++中PluginInfo::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginInfo::getName方法的具体用法?C++ PluginInfo::getName怎么用?C++ PluginInfo::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginInfo的用法示例。


在下文中一共展示了PluginInfo::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: pluginSignInfoIsEqual

bool PluginInfo::pluginSignInfoIsEqual(const PluginInfo& pluginInfo)
{
	return pluginName    == pluginInfo.getName() &&
	       pluginAuthor  == pluginInfo.getAuthor() &&
	       pluginVersion == pluginInfo.getVersion();
}
开发者ID:Nikitaterm,项目名称:rdo_studio,代码行数:6,代码来源:plugin_info.cpp

示例2: dirname

/*!
  Preload sequence, called when all the plugins are not yet loaded.
  \param server The server object to use.
  implementation it is a directory name.
 */
int
PluginsManager::preLoad (Server* server, string &resource)
{
  ReadDirectory fdir;
  ReadDirectory flib;
  string filename;
  string completeFileName;
  int ret;
  HashMap<string, bool> alreadyCkeched;

  loadOptions (server);
  filename.assign (resource);

  ret = fdir.findfirst (filename.c_str ());
  if (ret == -1)
    {
      server->log (MYSERVER_LOG_MSG_ERROR,
                   _("Invalid plugins source"));
      return ret;
    }

  ret = 0;
  do
    {
      string dirname (filename);

      dirname.append ("/");
      dirname.append (fdir.name);
      if (fdir.name[0] == '.' || !FilesUtility::isDirectory (dirname.c_str ()))
        continue;

      try
        {
          ret = flib.findfirst (dirname.c_str ());
        }
      catch (...)
        {
          continue;
        }

      do
        {
          string name (flib.name);
          if (flib.name[0] == '.')
            continue;

          if (!strstr (flib.name.c_str (), "plugin.xml"))
            continue;
          completeFileName.assign (filename);

          if ((fdir.name[0] != '/') && (fdir.name[0] != '\\'))
            completeFileName.append ("/");
          completeFileName.append (fdir.name);

          if ((flib.name[0] != '/') && (flib.name[0] != '\\'))
            completeFileName.append ("/");
          completeFileName.append (flib.name);

          string pname (fdir.name);

          if (alreadyCkeched.get (pname))
            continue;

          PluginInfo* pinfo = loadInfo (server, pname, completeFileName);
          alreadyCkeched.put (pname,true);
          if (!pinfo)
            {
              ret |= 1;
              continue;
            }
          string libname;
          libname.assign (dirname);

          libname.append ("/");
          libname.append (pinfo->getName ());
#ifdef WIN32
          libname.append (".dll");
#else
          libname.append (".so");
#endif

          ret |= loadFile (server, pname, libname, pinfo);
        }
      while (! flib.findnext ());
    }
  while (! fdir.findnext ());

  fdir.findclose ();
  flib.findclose ();
  return ret;
}
开发者ID:rupinder,项目名称:GNU-MyServer-GSoC,代码行数:96,代码来源:plugins_manager.cpp


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