本文整理汇总了C++中AStringVector::cend方法的典型用法代码示例。如果您正苦于以下问题:C++ AStringVector::cend方法的具体用法?C++ AStringVector::cend怎么用?C++ AStringVector::cend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AStringVector
的用法示例。
在下文中一共展示了AStringVector::cend方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RefreshPluginList
void cPluginManager::RefreshPluginList(void)
{
// Get a list of currently available folders:
AString PluginsPath = GetPluginsPath() + "/";
AStringVector Contents = cFile::GetFolderContents(PluginsPath.c_str());
AStringVector Folders;
for (auto & item: Contents)
{
if ((item == ".") || (item == "..") || (!cFile::IsFolder(PluginsPath + item)))
{
// We only want folders, and don't want "." or ".."
continue;
}
Folders.push_back(item);
} // for item - Contents[]
// Set all plugins with invalid folders as psNotFound:
for (auto & plugin: m_Plugins)
{
if (std::find(Folders.cbegin(), Folders.cend(), plugin->GetFolderName()) == Folders.end())
{
plugin->m_Status = psNotFound;
}
} // for plugin - m_Plugins[]
// Add all newly discovered plugins:
for (auto & folder: Folders)
{
bool hasFound = false;
for (auto & plugin: m_Plugins)
{
if (plugin->GetFolderName() == folder)
{
hasFound = true;
break;
}
} // for plugin - m_Plugins[]
if (!hasFound)
{
m_Plugins.push_back(std::make_shared<cPluginLua>(folder));
}
} // for folder - Folders[]
}