Play-/Source/StructCollectionStateFile.h

41 lines
997 B
C
Raw Normal View History

2017-09-09 17:38:26 -04:00
#pragma once
#include <map>
#include "zip/ZipFile.h"
#include "StructFile.h"
#include "uint128.h"
class CStructCollectionStateFile : public Framework::CZipFile
{
public:
typedef std::map<std::string, CStructFile> StructMap;
typedef StructMap::const_iterator StructIterator;
CStructCollectionStateFile(const char*);
CStructCollectionStateFile(Framework::CStream&);
2017-09-09 17:38:26 -04:00
virtual ~CStructCollectionStateFile() = default;
void InsertStruct(const char*, const CStructFile&);
void Read(Framework::CStream&);
2017-09-09 17:38:26 -04:00
void Write(Framework::CStream&) override;
StructIterator GetStructBegin() const;
StructIterator GetStructEnd() const;
private:
StructMap m_structs;
};
namespace std
{
static CStructCollectionStateFile::StructIterator begin(const CStructCollectionStateFile& stateFile)
{
return stateFile.GetStructBegin();
}
static CStructCollectionStateFile::StructIterator end(const CStructCollectionStateFile& stateFile)
{
return stateFile.GetStructEnd();
}
}