本文整理汇总了C++中KeyedArchive::Count方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyedArchive::Count方法的具体用法?C++ KeyedArchive::Count怎么用?C++ KeyedArchive::Count使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyedArchive
的用法示例。
在下文中一共展示了KeyedArchive::Count方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Save
void RenderObject::Save(KeyedArchive * archive, SceneFileV2* sceneFile)
{
AnimatedObject::Save(archive);
if(NULL != archive)
{
archive->SetUInt32("ro.type", type);
archive->SetUInt32("ro.flags", flags);
archive->SetUInt32("ro.debugflags", debugFlags);
archive->SetUInt32("ro.batchCount", GetRenderBatchCount());
KeyedArchive *batchesArch = new KeyedArchive();
for(uint32 i = 0; i < GetRenderBatchCount(); ++i)
{
RenderBatch *batch = GetRenderBatch(i);
if(NULL != batch)
{
KeyedArchive *batchArch = new KeyedArchive();
batch->Save(batchArch, sceneFile);
if(batchArch->Count() > 0)
{
batchArch->SetString("rb.classname", batch->GetClassName());
}
batchesArch->SetArchive(KeyedArchive::GenKeyFromIndex(i), batchArch);
batchArch->Release();
}
}
archive->SetArchive("ro.batches", batchesArch);
batchesArch->Release();
}
}
示例2:
DAVA::Vector<String> RecentFilesManager::GetRecentFiles()
{
DAVA::Vector<String> retVector;
VariantType recentFilesVariant = SettingsManager::GetValue(Settings::Internal_RecentFiles);
if(recentFilesVariant.GetType() == DAVA::VariantType::TYPE_KEYED_ARCHIVE)
{
KeyedArchive* archiveRecentFiles = recentFilesVariant.AsKeyedArchive();
DAVA::uint32 size = archiveRecentFiles->Count();
retVector.resize(size);
for (DAVA::uint32 i = 0; i < size; ++i)
{
retVector[i] = archiveRecentFiles->GetString(Format("%d", i));
}
}
return retVector;
}