本文整理汇总了C++中PluginManager::getLibraryVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginManager::getLibraryVersion方法的具体用法?C++ PluginManager::getLibraryVersion怎么用?C++ PluginManager::getLibraryVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager::getLibraryVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createProcessorFromPluginInfo
GenericProcessor* createProcessorFromPluginInfo(Plugin::PluginType type, int index, String procName, String libName, int libVersion, bool source, bool sink)
{
PluginManager* pm = AccessClass::getPluginManager();
GenericProcessor* proc = nullptr;
if (index > -1)
{
if (type == Plugin::NOT_A_PLUGIN_TYPE)
{
return createBuiltInProcessor(index);
}
else if (type == Plugin::PLUGIN_TYPE_PROCESSOR)
{
for (int i = 0; i < pm->getNumProcessors(); i++)
{
Plugin::ProcessorInfo info = pm->getProcessorInfo(i);
if (procName.equalsIgnoreCase(info.name))
{
int libIndex = pm->getLibraryIndexFromPlugin(Plugin::PLUGIN_TYPE_PROCESSOR, i);
if (libName.equalsIgnoreCase(pm->getLibraryName(libIndex)) && libVersion == pm->getLibraryVersion(libIndex))
{
proc = info.creator();
proc->setPluginData(Plugin::PLUGIN_TYPE_PROCESSOR, i);
return proc;
}
}
}
}
else if (type == Plugin::PLUGIN_TYPE_DATA_THREAD)
{
for (int i = 0; i < pm->getNumDataThreads(); i++)
{
Plugin::DataThreadInfo info = pm->getDataThreadInfo(i);
if (procName.equalsIgnoreCase(info.name))
{
int libIndex = pm->getLibraryIndexFromPlugin(Plugin::PLUGIN_TYPE_DATA_THREAD, i);
if (libName.equalsIgnoreCase(pm->getLibraryName(libIndex)) && libVersion == pm->getLibraryVersion(libIndex))
{
proc = new SourceNode(info.name, info.creator);
proc->setPluginData(Plugin::PLUGIN_TYPE_DATA_THREAD, i);
return proc;
}
}
}
}
}
proc = new PlaceholderProcessor(procName, libName, libVersion, source, sink);
proc->setPluginData(Plugin::NOT_A_PLUGIN_TYPE, -1);
return proc;
}
示例2: setPluginData
void PluginClass::setPluginData(Plugin::PluginType type, int index)
{
PluginManager* pm = AccessClass::getPluginManager();
String name;
pluginType = type;
pluginIndex = index;
switch (type)
{
case Plugin::ProcessorPlugin:
{
Plugin::ProcessorInfo i = pm->getProcessorInfo(index);
name = i.name;
}
break;
case Plugin::RecordEnginePlugin:
{
Plugin::RecordEngineInfo i = pm->getRecordEngineInfo(index);
name = i.name;
}
break;
case Plugin::DatathreadPlugin:
{
Plugin::DataThreadInfo i = pm->getDataThreadInfo(index);
name = i.name;
}
break;
case Plugin::FileSourcePlugin:
{
Plugin::FileSourceInfo i = pm->getFileSourceInfo(index);
name = i.name;
}
break;
case Plugin::NotAPlugin:
{
String pName;
int pType;
ProcessorManager::getProcessorNameAndType(BuiltInProcessor, index, pName, pType);
name = pName;
}
default:
return;
}
pluginName = name;
libName = pm->getLibraryName(pm->getLibraryIndexFromPlugin(type, index));
libVersion = pm->getLibraryVersion(pm->getLibraryIndexFromPlugin(type, index));
}