mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-01 17:41:23 +00:00
Move WorldModel private functions to bottom
This is API class. A reader most likely need to know public functions first.
This commit is contained in:
parent
67cf3879ac
commit
df6630a15c
1 changed files with 24 additions and 23 deletions
|
@ -38,29 +38,6 @@ namespace MWWorld
|
||||||
/// \brief Cell container
|
/// \brief Cell container
|
||||||
class WorldModel
|
class WorldModel
|
||||||
{
|
{
|
||||||
typedef std::vector<std::pair<ESM::RefId, CellStore*>> IdCache;
|
|
||||||
const MWWorld::ESMStore& mStore;
|
|
||||||
ESM::ReadersCache& mReaders;
|
|
||||||
mutable std::unordered_map<ESM::RefId, CellStore> mCells;
|
|
||||||
mutable std::map<std::string, CellStore*, Misc::StringUtils::CiComp> mInteriors;
|
|
||||||
|
|
||||||
mutable std::map<ESM::ExteriorCellLocation, CellStore*> mExteriors;
|
|
||||||
IdCache mIdCache;
|
|
||||||
std::size_t mIdCacheIndex = 0;
|
|
||||||
std::unordered_map<ESM::RefNum, Ptr> mPtrIndex;
|
|
||||||
std::size_t mPtrIndexUpdateCounter = 0;
|
|
||||||
ESM::RefNum mLastGeneratedRefnum;
|
|
||||||
|
|
||||||
CellStore& getOrInsertCellStore(const ESM::Cell& cell);
|
|
||||||
|
|
||||||
CellStore& insertCellStore(const ESM::Cell& cell);
|
|
||||||
|
|
||||||
CellStore* getInteriorOrNull(std::string_view name);
|
|
||||||
|
|
||||||
Ptr getPtrAndCache(const ESM::RefId& name, CellStore& cellStore);
|
|
||||||
|
|
||||||
void writeCell(ESM::ESMWriter& writer, CellStore& cell) const;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit WorldModel(const MWWorld::ESMStore& store, ESM::ReadersCache& reader);
|
explicit WorldModel(const MWWorld::ESMStore& store, ESM::ReadersCache& reader);
|
||||||
|
|
||||||
|
@ -111,6 +88,30 @@ namespace MWWorld
|
||||||
void write(ESM::ESMWriter& writer, Loading::Listener& progress) const;
|
void write(ESM::ESMWriter& writer, Loading::Listener& progress) const;
|
||||||
|
|
||||||
bool readRecord(ESM::ESMReader& reader, uint32_t type, const std::map<int, int>& contentFileMap);
|
bool readRecord(ESM::ESMReader& reader, uint32_t type, const std::map<int, int>& contentFileMap);
|
||||||
|
|
||||||
|
private:
|
||||||
|
using IdCache = std::vector<std::pair<ESM::RefId, CellStore*>>;
|
||||||
|
|
||||||
|
const MWWorld::ESMStore& mStore;
|
||||||
|
ESM::ReadersCache& mReaders;
|
||||||
|
mutable std::unordered_map<ESM::RefId, CellStore> mCells;
|
||||||
|
mutable std::map<std::string, CellStore*, Misc::StringUtils::CiComp> mInteriors;
|
||||||
|
mutable std::map<ESM::ExteriorCellLocation, CellStore*> mExteriors;
|
||||||
|
IdCache mIdCache;
|
||||||
|
std::size_t mIdCacheIndex = 0;
|
||||||
|
std::unordered_map<ESM::RefNum, Ptr> mPtrIndex;
|
||||||
|
std::size_t mPtrIndexUpdateCounter = 0;
|
||||||
|
ESM::RefNum mLastGeneratedRefnum;
|
||||||
|
|
||||||
|
CellStore& getOrInsertCellStore(const ESM::Cell& cell);
|
||||||
|
|
||||||
|
CellStore& insertCellStore(const ESM::Cell& cell);
|
||||||
|
|
||||||
|
CellStore* getInteriorOrNull(std::string_view name);
|
||||||
|
|
||||||
|
Ptr getPtrAndCache(const ESM::RefId& name, CellStore& cellStore);
|
||||||
|
|
||||||
|
void writeCell(ESM::ESMWriter& writer, CellStore& cell) const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue