OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
infocollection.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_INFOCOLLECTION_H
2 #define CSM_WOLRD_INFOCOLLECTION_H
3 
4 #include "collection.hpp"
5 #include "info.hpp"
6 
7 namespace ESM
8 {
9  struct Dialogue;
10 }
11 
12 namespace CSMWorld
13 {
14  class InfoCollection : public Collection<Info, IdAccessor<Info> >
15  {
16  public:
17 
18  typedef std::vector<Record<Info> >::const_iterator RecordConstIterator;
19  typedef std::pair<RecordConstIterator, RecordConstIterator> Range;
20 
21  private:
22 
23  void load (const Info& record, bool base);
24 
25  int getInfoIndex (const std::string& id, const std::string& topic) const;
29 
30  public:
31 
32  virtual int getAppendIndex (const std::string& id,
35 
36  virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder);
41 
42  void load (ESM::ESMReader& reader, bool base, const ESM::Dialogue& dialogue);
43 
44  Range getTopicRange (const std::string& topic) const;
47 
48  void removeDialogueInfos(const std::string& dialogueId);
49  };
50 }
51 
52 #endif
std::vector< Record< Info > >::const_iterator RecordConstIterator
Definition: infocollection.hpp:18
Definition: esmreader.hpp:21
Type
Definition: universalid.hpp:40
Single-type record collection.
Definition: collection.hpp:44
Definition: infocollection.hpp:14
Definition: loaddial.hpp:21
virtual bool reorderRows(int baseIndex, const std::vector< int > &newOrder)
Definition: infocollection.cpp:88
Definition: info.hpp:8
void removeDialogueInfos(const std::string &dialogueId)
Definition: infocollection.cpp:191
virtual int getAppendIndex(const std::string &id, UniversalId::Type type=UniversalId::Type_None) const
Definition: infocollection.cpp:73
int getInfoIndex(const std::string &id, const std::string &topic) const
Definition: infocollection.cpp:60
std::pair< RecordConstIterator, RecordConstIterator > Range
Definition: infocollection.hpp:19
void load(const Info &record, bool base)
Definition: infocollection.cpp:11
Range getTopicRange(const std::string &topic) const
Definition: infocollection.cpp:142
Definition: universalid.hpp:42