OpenMW
Public Member Functions | Private Member Functions | Private Attributes
MWWorld::Cells Class Reference

Cell container. More...

#include <cells.hpp>

List of all members.

Public Member Functions

void clear ()
 Cells (const MWWorld::ESMStore &store, std::vector< ESM::ESMReader > &reader)
CellStoregetExterior (int x, int y)
CellStoregetInterior (const std::string &name)
Ptr getPtr (const std::string &name, CellStore &cellStore, bool searchInContainers=false)
Ptr getPtr (const std::string &name)
void getExteriorPtrs (const std::string &name, std::vector< MWWorld::Ptr > &out)

Private Member Functions

 Cells (const Cells &)
Cellsoperator= (const Cells &)
CellStoregetCellStore (const ESM::Cell *cell)
Ptr getPtrAndCache (const std::string &name, CellStore &cellStore)

Private Attributes

const MWWorld::ESMStoremStore
std::vector< ESM::ESMReader > & mReader
std::map< std::string, CellStoremInteriors
std::map< std::pair< int, int >
, CellStore
mExteriors
std::vector< std::pair
< std::string, CellStore * > > 
mIdCache
std::size_t mIdCacheIndex

Detailed Description

Cell container.


Constructor & Destructor Documentation

MWWorld::Cells::Cells ( const Cells ) [private]
MWWorld::Cells::Cells ( const MWWorld::ESMStore store,
std::vector< ESM::ESMReader > &  reader 
)
Todo:
pass the dynamic part of the ESMStore isntead (once it is written) of the whole world

Member Function Documentation

void MWWorld::Cells::getExteriorPtrs ( const std::string &  name,
std::vector< MWWorld::Ptr > &  out 
)

Get all Ptrs referencing name in exterior cells

Note:
Due to the current implementation of getPtr this only supports one Ptr per cell.
name must be lower case
MWWorld::Ptr::CellStore * MWWorld::Cells::getInterior ( const std::string &  name)
MWWorld::Ptr MWWorld::Cells::getPtr ( const std::string &  name,
Ptr::CellStore cell,
bool  searchInContainers = false 
)
Parameters:
searchInContainersOnly affect loaded cells.
Note:
name must be lower case
MWWorld::Ptr MWWorld::Cells::getPtr ( const std::string &  name)
Note:
name must be lower case
MWWorld::Ptr MWWorld::Cells::getPtrAndCache ( const std::string &  name,
Ptr::CellStore cellStore 
) [private]
Cells& MWWorld::Cells::operator= ( const Cells ) [private]

Member Data Documentation

std::map<std::pair<int, int>, CellStore> MWWorld::Cells::mExteriors [private]
std::vector<std::pair<std::string, CellStore *> > MWWorld::Cells::mIdCache [private]
std::size_t MWWorld::Cells::mIdCacheIndex [private]
std::map<std::string, CellStore> MWWorld::Cells::mInteriors [private]
std::vector<ESM::ESMReader>& MWWorld::Cells::mReader [private]

The documentation for this class was generated from the following files: