mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +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
@ -38,29 +38,6 @@ namespace MWWorld
|
||||
/// \brief Cell container
|
||||
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:
|
||||
explicit WorldModel(const MWWorld::ESMStore& store, ESM::ReadersCache& reader);
|
||||
|
||||
@ -111,6 +88,30 @@ namespace MWWorld
|
||||
void write(ESM::ESMWriter& writer, Loading::Listener& progress) const;
|
||||
|
||||
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…
x
Reference in New Issue
Block a user