OpenMW
|
#include <infocollection.hpp>
Public Types | |
typedef std::vector< Record < Info > >::const_iterator | RecordConstIterator |
typedef std::pair < RecordConstIterator, RecordConstIterator > | Range |
Public Types inherited from CSMWorld::Collection< Info, IdAccessor< Info > > | |
typedef Info | ESXRecord |
Public Member Functions | |
virtual int | getAppendIndex (const std::string &id, UniversalId::Type type=UniversalId::Type_None) const |
virtual bool | reorderRows (int baseIndex, const std::vector< int > &newOrder) |
void | load (ESM::ESMReader &reader, bool base, const ESM::Dialogue &dialogue) |
Range | getTopicRange (const std::string &topic) const |
void | removeDialogueInfos (const std::string &dialogueId) |
Public Member Functions inherited from CSMWorld::Collection< Info, IdAccessor< Info > > | |
Collection () | |
virtual | ~Collection () |
void | add (const Info &record) |
Add a new record (modified) More... | |
virtual int | getSize () const |
virtual std::string | getId (int index) const |
virtual int | getIndex (const std::string &id) const |
virtual int | getColumns () const |
virtual QVariant | getData (int index, int column) const |
virtual void | setData (int index, int column, const QVariant &data) |
virtual const ColumnBase & | getColumn (int column) const |
virtual void | merge () |
Merge modified into base. More... | |
virtual void | purge () |
Remove records that are flagged as erased. More... | |
virtual void | removeRows (int index, int count) |
< Merge modified into base. More... | |
virtual void | appendBlankRecord (const std::string &id, UniversalId::Type type=UniversalId::Type_None) |
virtual void | cloneRecord (const std::string &origin, const std::string &destination, const UniversalId::Type type) |
virtual bool | touchRecord (const std::string &id) |
virtual int | searchId (const std::string &id) const |
virtual void | replace (int index, const RecordBase &record) |
virtual void | appendRecord (const RecordBase &record, UniversalId::Type type=UniversalId::Type_None) |
virtual const Record< Info > & | getRecord (const std::string &id) const |
virtual const Record< Info > & | getRecord (int index) const |
virtual std::vector< std::string > | getIds (bool listDeleted=true) const |
virtual void | insertRecord (const RecordBase &record, int index, UniversalId::Type type=UniversalId::Type_None) |
void | addColumn (Column< Info > *column) |
void | setRecord (int index, const Record< Info > &record) |
NestableColumn * | getNestableColumn (int column) const |
Public Member Functions inherited from CSMWorld::CollectionBase | |
CollectionBase () | |
virtual | ~CollectionBase () |
int | searchColumnIndex (Columns::ColumnId id) const |
Return index of column with the given id. If no such column exists, -1 is returned. More... | |
int | findColumnIndex (Columns::ColumnId id) const |
Private Member Functions | |
void | load (const Info &record, bool base) |
int | getInfoIndex (const std::string &id, const std::string &topic) const |
Additional Inherited Members | |
Protected Member Functions inherited from CSMWorld::Collection< Info, IdAccessor< Info > > | |
const std::map< std::string, int > & | getIdMap () const |
const std::vector< Record < Info > > & | getRecords () const |
bool | reorderRowsImp (int baseIndex, const std::vector< int > &newOrder) |
int | cloneRecordImp (const std::string &origin, const std::string &dest, UniversalId::Type type) |
Returns the index of the clone. More... | |
int | touchRecordImp (const std::string &id) |
Returns the index of the record on success, -1 on failure. More... | |
typedef std::pair<RecordConstIterator, RecordConstIterator> CSMWorld::InfoCollection::Range |
typedef std::vector<Record<Info> >::const_iterator CSMWorld::InfoCollection::RecordConstIterator |
|
virtual |
type | Will be ignored, unless the collection supports multiple record types |
Reimplemented from CSMWorld::Collection< Info, IdAccessor< Info > >.
|
private |
Return index for record id or -1 (if not present; deleted records are considered)
id | info ID without topic prefix |
CSMWorld::InfoCollection::Range CSMWorld::InfoCollection::getTopicRange | ( | const std::string & | topic | ) | const |
Return iterators that point to the beginning and past the end of the range for the given topic.
void CSMWorld::InfoCollection::load | ( | ESM::ESMReader & | reader, |
bool | base, | ||
const ESM::Dialogue & | dialogue | ||
) |
void CSMWorld::InfoCollection::removeDialogueInfos | ( | const std::string & | dialogueId | ) |
|
virtual |
Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices given in newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
Reimplemented from CSMWorld::Collection< Info, IdAccessor< Info > >.