本文整理汇总了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();
}
示例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;
}