1 #ifndef GAME_MWWORLD_CELLSTORE_H
2 #define GAME_MWWORLD_CELLSTORE_H
10 #include <boost/shared_ptr.hpp>
36 #include "../mwmechanics/pathgrid.hpp"
75 std::vector<std::string>
mIds;
124 template<
class Visitor,
class List>
127 for (
typename List::List::iterator iter (list.mList.begin()); iter!=list.mList.end();
139 template<
class Visitor>
191 template <
typename T>
204 std::vector<ESM::ESMReader>& readerList);
216 bool hasId (
const std::string&
id)
const;
258 template<
class Visitor>
285 template<
class Visitor>
308 template <
class T,
class Visitor>
382 std::list<ESM::Pathgrid::Point>
aStarSearch(
const int start,
const int end)
const;
391 void loadRef (
ESM::CellRef& ref,
bool deleted, std::map<ESM::RefNum, std::string>& refNumToID);
473 return mCreatureLists;
546 bool operator== (
const CellStore& left,
const CellStore& right);
547 bool operator!= (
const CellStore& left,
const CellStore& right);
State
Definition: cellstore.hpp:57
MWMechanics::PathgridGraph mPathgridGraph
Definition: cellstore.hpp:396
Used to create pointers to hold any type of LiveCellRef<> object.
Definition: livecellref.hpp:22
CellStore(const ESM::Cell *cell_, const MWWorld::ESMStore &store, std::vector< ESM::ESMReader > &readerList)
Definition: cellstore.cpp:331
Encapsulated variant of ESM::CellRef with change tracking.
Definition: cellref.hpp:15
static bool isAccessible(const MWWorld::RefData &refdata, const MWWorld::CellRef &cref)
Definition: cellstore.hpp:177
bool forEachType(Visitor &visitor)
Definition: cellstore.hpp:309
LiveCellRefBase * insert(const LiveCellRef< T > *ref)
Definition: cellstore.hpp:192
const MWWorld::ESMStore & mStore
Definition: cellstore.hpp:64
const ESM::Cell * mCell
Definition: cellstore.hpp:72
CellRefList< ESM::Potion > mPotions
Definition: cellstore.hpp:82
const ESM::Cell * getCell() const
Definition: cellstore.cpp:337
bool operator==(const LiveCellRef< X > &ref, int pRefnum)
Definition: cellstore.cpp:205
const CellRefList< ESM::Static > & getReadOnlyStatics() const
Definition: cellstore.hpp:348
CellRefList< ESM::Repair > mRepairs
Definition: cellstore.hpp:98
CellRefList< ESM::Ingredient > mIngreds
Definition: cellstore.hpp:90
Definition: esmreader.hpp:21
void load()
Load references from content file.
Definition: cellstore.cpp:438
float mWaterLevel
Definition: cellstore.hpp:76
Definition: cellstore.hpp:367
float getWaterLevel() const
Definition: cellstore.cpp:420
Definition: fogstate.hpp:19
bool forEach(Visitor &visitor)
Definition: cellstore.hpp:259
bool isPointConnected(const int start, const int end) const
Definition: cellstore.cpp:940
bool mHasState
Definition: cellstore.hpp:74
MWWorld::CellRef mRef
Definition: livecellref.hpp:29
MWWorld::Ptr moveTo(const MWWorld::Ptr &object, MWWorld::CellStore *cellToMoveTo)
Definition: cellstore.cpp:238
CellRefList< ESM::Probe > mProbes
Definition: cellstore.hpp:97
void loadRefs()
Definition: cellstore.cpp:521
void updateMergedRefs()
Repopulate mMergedRefs.
Definition: cellstore.cpp:323
CellRefList< ESM::Miscellaneous > mMiscItems
Definition: cellstore.hpp:95
const CellRefList< ESM::Door > & getReadOnlyDoors() const
Definition: cellstore.hpp:344
CellRefList< ESM::Activator > mActivators
Definition: cellstore.hpp:81
Definition: livecellref.hpp:77
State getState() const
Definition: cellstore.cpp:342
bool isExterior() const
Definition: cellstore.cpp:576
bool hasId(const std::string &id) const
Definition: cellstore.cpp:357
bool isDeletedByContentFile() const
Returns true if the object was deleted by a content file.
Definition: refdata.cpp:180
LiveRef & insert(const LiveRef &item)
Definition: cellreflist.hpp:27
Definition: refdata.hpp:29
RefData mData
Definition: livecellref.hpp:32
void moveFrom(const MWWorld::Ptr &object, MWWorld::CellStore *from)
Moves object from the given cell to this cell.
Definition: cellstore.cpp:218
void writeFog(ESM::ESMWriter &writer) const
Definition: cellstore.cpp:700
void saveState(ESM::CellState &state) const
Definition: cellstore.cpp:688
CellRefList< ESM::NPC > mNpcs
Definition: cellstore.hpp:96
Definition: esmwriter.hpp:17
Definition: cellstore.hpp:59
bool forEachConst(Visitor &visitor) const
Definition: cellstore.hpp:286
int count() const
Return total number of references, including deleted ones.
Definition: cellstore.cpp:433
Definition: esmstore.hpp:17
CellRefList< ESM::Clothing > mClothes
Definition: cellstore.hpp:86
void respawn()
Check mLastRespawn and respawn references if necessary. This is a no-op if the cell is not loaded...
Definition: cellstore.cpp:968
void loadRef(ESM::CellRef &ref, bool deleted, std::map< ESM::RefNum, std::string > &refNumToID)
Definition: cellstore.cpp:601
CellRefList< ESM::CreatureLevList > mCreatureLists
Definition: cellstore.hpp:91
int getCount() const
Definition: refdata.cpp:149
ConstPtr searchConst(const std::string &id) const
Definition: cellstore.cpp:392
void listRefs()
Run through references and store IDs.
Definition: cellstore.cpp:465
Ptr search(const std::string &id)
Definition: cellstore.cpp:384
std::list< ESM::Pathgrid::Point > aStarSearch(const int start, const int end) const
Definition: cellstore.cpp:945
Mutable state of a cell.
Definition: cellstore.hpp:53
List mList
Definition: cellreflist.hpp:16
bool forEachInternal(Visitor &visitor)
Definition: cellstore.hpp:140
Pointer to a const LiveCellRef.
Definition: ptr.hpp:90
CellRefList< ESM::Book > mBooks
Definition: cellstore.hpp:85
bool forEachImp(Visitor &visitor, List &list)
Definition: cellstore.hpp:125
void preload()
Build ID list from content file.
Definition: cellstore.cpp:455
MovedRefTracker mMovedHere
Definition: cellstore.hpp:106
Definition: cellref.hpp:34
Definition: loadcell.hpp:64
CellRefList< ESM::ItemLevList > mItemLists
Definition: cellstore.hpp:92
std::vector< ESM::ESMReader > & mReader
Definition: cellstore.hpp:65
bool hasState() const
Does this cell have state that needs to be stored in a saved game file?
Definition: cellstore.cpp:352
In-game time stamp.
Definition: timestamp.hpp:14
CellRefList< ESM::Static > mStatics
Definition: cellstore.hpp:99
CellRefList< ESM::Creature > mCreatures
Definition: cellstore.hpp:88
ESM::FogState * getFog() const
Definition: cellstore.cpp:955
void loadState(const ESM::CellState &state)
Definition: cellstore.cpp:677
void setWaterLevel(float level)
Definition: cellstore.cpp:427
CellRefList< ESM::Light > mLights
Definition: cellstore.hpp:93
std::vector< std::string > mIds
Definition: cellstore.hpp:75
std::map< LiveCellRefBase *, MWWorld::CellStore * > MovedRefTracker
Definition: cellstore.hpp:103
CellRefList< ESM::Container > mContainers
Definition: cellstore.hpp:87
void readFog(ESM::ESMReader &reader)
Definition: cellstore.cpp:708
Ptr searchInContainer(const std::string &id)
Definition: cellstore.cpp:581
Definition: pathgrid.hpp:20
Definition: cellstore.hpp:59
virtual CellStore * getCellStore(const ESM::CellId &cellId)=0
CellRefList< ESM::Weapon > mWeapons
Definition: cellstore.hpp:100
void setFog(ESM::FogState *fog)
Definition: cellstore.cpp:950
CellRefList< ESM::BodyPart > mBodyParts
Definition: cellstore.hpp:101
Definition: cellstore.hpp:59
State mState
Definition: cellstore.hpp:73
CellRefList< ESM::Armor > mArmors
Definition: cellstore.hpp:84
boost::shared_ptr< ESM::FogState > mFogState
Definition: cellstore.hpp:70
Ptr getCurrentPtr(MWWorld::LiveCellRefBase *ref)
Definition: cellstore.cpp:210
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
void readReferences(ESM::ESMReader &reader, const std::map< int, int > &contentFileMap, GetCellStoreCallback *callback)
Definition: cellstore.cpp:749
bool operator!=(const CellStore &left, const CellStore &right)
Definition: cellstore.cpp:935
CellRefList< ESM::Lockpick > mLockpicks
Definition: cellstore.hpp:94
void writeReferences(ESM::ESMWriter &writer) const
Definition: cellstore.cpp:714
Definition: cellid.hpp:11
MWWorld::TimeStamp mLastRespawn
Definition: cellstore.hpp:78
bool hasContentFile() const
Does the RefNum have a content file?
Definition: cellref.cpp:13
CellRefList< ESM::Apparatus > mAppas
Definition: cellstore.hpp:83
Ptr searchViaActorId(int id)
Will return an empty Ptr if cell is not loaded.
Definition: cellstore.cpp:400
std::vector< LiveCellRefBase * > mMergedRefs
Definition: cellstore.hpp:112
CellRefList< ESM::Door > mDoors
Definition: cellstore.hpp:89
MovedRefTracker mMovedToAnotherCell
Definition: cellstore.hpp:109
const std::vector< std::string > & getPreloadedIds() const
Get Ids of objects in this cell, only valid in State_Preloaded.
Definition: cellstore.cpp:347
Definition: cellstate.hpp:16