mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 08:57:09 +00:00
Implemented binary serializer classes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user