OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localscripts.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWWORLD_LOCALSCRIPTS_H
2 #define GAME_MWWORLD_LOCALSCRIPTS_H
3 
4 #include <list>
5 #include <string>
6 
7 #include "ptr.hpp"
8 
9 namespace MWWorld
10 {
11  class ESMStore;
12  class CellStore;
13  class RefData;
14 
17  {
18  std::list<std::pair<std::string, Ptr> > mScripts;
19  std::list<std::pair<std::string, Ptr> >::iterator mIter;
21 
22  public:
23 
24  LocalScripts (const MWWorld::ESMStore& store);
25 
26  void startIteration();
28 
29  bool getNext(std::pair<std::string, Ptr>& script);
32 
33  void add (const std::string& scriptName, const Ptr& ptr);
35 
36  void addCell (CellStore *cell);
38 
39  void clear();
41 
42  void clearCell (CellStore *cell);
44 
45  void remove (RefData *ref);
46 
47  void remove (const Ptr& ptr);
49  };
50 }
51 
52 #endif
std::list< std::pair< std::string, Ptr > >::iterator mIter
Definition: localscripts.hpp:19
LocalScripts(const MWWorld::ESMStore &store)
Definition: localscripts.cpp:64
std::list< std::pair< std::string, Ptr > > mScripts
Definition: localscripts.hpp:18
void add(const std::string &scriptName, const Ptr &ptr)
Add script to collection of active local scripts.
Definition: localscripts.cpp:85
const MWWorld::ESMStore & mStore
Definition: localscripts.hpp:20
void clearCell(CellStore *cell)
Remove all scripts belonging to cell.
Definition: localscripts.cpp:132
void startIteration()
Set the iterator to the begin of the script list.
Definition: localscripts.cpp:69
Definition: refdata.hpp:29
Definition: esmstore.hpp:17
void addCell(CellStore *cell)
Add all local scripts in a cell.
Definition: localscripts.cpp:116
Mutable state of a cell.
Definition: cellstore.hpp:53
void clear()
Clear active local scripts collection.
Definition: localscripts.cpp:127
List of active local scripts.
Definition: localscripts.hpp:16
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
bool getNext(std::pair< std::string, Ptr > &script)
Definition: localscripts.cpp:74