OpenMW
|
00001 #ifndef CSM_WOLRD_INFOCOLLECTION_H 00002 #define CSM_WOLRD_INFOCOLLECTION_H 00003 00004 #include "collection.hpp" 00005 #include "info.hpp" 00006 00007 namespace ESM 00008 { 00009 class Dialogue; 00010 } 00011 00012 namespace CSMWorld 00013 { 00014 class InfoCollection : public Collection<Info, IdAccessor<Info> > 00015 { 00016 public: 00017 00018 typedef std::vector<Record<Info> >::const_iterator RecordConstIterator; 00019 typedef std::pair<RecordConstIterator, RecordConstIterator> Range; 00020 00021 private: 00022 00023 void load (const Info& record, bool base); 00024 00025 int getIndex (const std::string& id, const std::string& topic) const; 00029 00030 public: 00031 00032 virtual int getAppendIndex (const std::string& id, 00033 UniversalId::Type type = UniversalId::Type_None) const; 00035 00036 virtual bool reorderRows (int baseIndex, const std::vector<int>& newOrder); 00041 00042 void load (ESM::ESMReader& reader, bool base, const ESM::Dialogue& dialogue); 00043 00044 Range getTopicRange (const std::string& topic) const; 00047 }; 00048 } 00049 00050 #endif