本文整理汇总了C++中SystemData::getIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemData::getIndex方法的具体用法?C++ SystemData::getIndex怎么用?C++ SystemData::getIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SystemData
的用法示例。
在下文中一共展示了SystemData::getIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadAutoCollectionSystems
void CollectionSystemManager::loadAutoCollectionSystems()
{
for(std::map<std::string, CollectionSystemDecl>::iterator it = mCollectionSystemDecls.begin() ; it != mCollectionSystemDecls.end() ; it++ )
{
CollectionSystemDecl sysDecl = it->second;
if (!sysDecl.isCustom && !findCollectionSystem(sysDecl.name))
{
SystemData* newSys = new SystemData(sysDecl.name, sysDecl.longName, mCollectionEnvData, sysDecl.themeFolder, true);
FileData* rootFolder = newSys->getRootFolder();
FileFilterIndex* index = newSys->getIndex();
for(auto sysIt = SystemData::sSystemVector.begin(); sysIt != SystemData::sSystemVector.end(); sysIt++)
{
if ((*sysIt)->isGameSystem()) {
std::vector<FileData*> files = (*sysIt)->getRootFolder()->getFilesRecursive(GAME);
for(auto gameIt = files.begin(); gameIt != files.end(); gameIt++)
{
bool include = includeFileInAutoCollections((*gameIt));
switch(sysDecl.type) {
case AUTO_LAST_PLAYED:
include = include && (*gameIt)->metadata.get("playcount") > "0";
break;
case AUTO_FAVORITES:
// we may still want to add files we don't want in auto collections in "favorites"
include = (*gameIt)->metadata.get("favorite") == "true";
break;
}
if (include) {
CollectionFileData* newGame = new CollectionFileData(*gameIt, newSys);
rootFolder->addChild(newGame);
index->addToIndex(newGame);
}
}
}
}
rootFolder->sort(getSortType(sysDecl.defaultSort));
mAutoCollectionSystems.push_back(newSys);
CollectionSystemData newCollectionData;
newCollectionData.system = newSys;
newCollectionData.decl = sysDecl;
newCollectionData.isEnabled = false;
mAllCollectionSystems[sysDecl.name] = newCollectionData;
}
}
}