Implemented binary serializer classes

This commit is contained in:
parax0
2016-08-23 20:42:05 -06:00
parent 9a243f94ac
commit 3dc0d71403
21 changed files with 519 additions and 43 deletions

View File

@@ -6,6 +6,7 @@
class CResourceIterator
{
protected:
CResourceStore *mpStore;
std::map<CAssetID, CResourceEntry*>::iterator mIter;
CResourceEntry *mpCurEntry;
@@ -19,7 +20,7 @@ public:
Next();
}
inline CResourceEntry* Next()
virtual CResourceEntry* Next()
{
if (mIter != mpStore->mResourceEntries.end())
{
@@ -65,5 +66,22 @@ public:
}
};
template<class ResType>
class TResourceIterator : public CResourceIterator
{
public:
TResourceIterator(CResourceStore *pStore = gpResourceStore)
: CResourceIterator(pStore) {}
virtual CResourceEntry* Next()
{
do {
CResourceIterator::Next();
} while (mpCurEntry && mpCurEntry->ResourceType() != ResType::StaticType());
return mpCurEntry;
}
};
#endif // CRESOURCEITERATOR