OpenMW
|
Base class for record collections. More...
#include <collectionbase.hpp>
Public Member Functions | |
CollectionBase () | |
virtual | ~CollectionBase () |
virtual int | getSize () const =0 |
virtual std::string | getId (int index) const =0 |
virtual int | getIndex (const std::string &id) const =0 |
virtual int | getColumns () const =0 |
virtual const ColumnBase & | getColumn (int column) const =0 |
virtual QVariant | getData (int index, int column) const =0 |
virtual void | setData (int index, int column, const QVariant &data)=0 |
virtual void | removeRows (int index, int count)=0 |
< Merge modified into base. More... | |
virtual void | appendBlankRecord (const std::string &id, UniversalId::Type type=UniversalId::Type_None)=0 |
virtual int | searchId (const std::string &id) const =0 |
virtual void | replace (int index, const RecordBase &record)=0 |
virtual void | appendRecord (const RecordBase &record, UniversalId::Type type=UniversalId::Type_None)=0 |
If the record type does not match, an exception is thrown. More... | |
virtual void | cloneRecord (const std::string &origin, const std::string &destination, const UniversalId::Type type)=0 |
virtual const RecordBase & | getRecord (const std::string &id) const =0 |
virtual const RecordBase & | getRecord (int index) const =0 |
virtual int | getAppendIndex (const std::string &id, UniversalId::Type type=UniversalId::Type_None) const =0 |
virtual std::vector< std::string > | getIds (bool listDeleted=true) const =0 |
virtual bool | reorderRows (int baseIndex, const std::vector< int > &newOrder)=0 |
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 | |
CollectionBase (const CollectionBase &) | |
CollectionBase & | operator= (const CollectionBase &) |
Base class for record collections.
|
private |
CSMWorld::CollectionBase::CollectionBase | ( | ) |
|
virtual |
|
pure virtual |
type | Will be ignored, unless the collection supports multiple record types |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
pure virtual |
If the record type does not match, an exception is thrown.
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
pure virtual |
int CSMWorld::CollectionBase::findColumnIndex | ( | Columns::ColumnId | id | ) | const |
Return index of column with the given id. If no such column exists, an exception is thrown.
|
pure virtual |
type | Will be ignored, unless the collection supports multiple record types |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, CSMWorld::RefIdCollection, and CSMWorld::InfoCollection.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Return a sorted collection of all IDs
listDeleted | include deleted record in the list |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
pure virtual |
|
pure virtual |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
pure virtual |
|
pure virtual |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
private |
< Merge modified into base.
< Remove records that are flagged as erased.
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
|
pure 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).
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, CSMWorld::RefIdCollection, and CSMWorld::InfoCollection.
|
pure virtual |
If the record type does not match, an exception is thrown.
type | Will be ignored, unless the collection supports multiple record types |
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.
int CSMWorld::CollectionBase::searchColumnIndex | ( | Columns::ColumnId | id | ) | const |
Return index of column with the given id. If no such column exists, -1 is returned.
|
pure virtual |
Search record with id.
Implemented in CSMWorld::Collection< ESXRecordT, IdAccessorT >, CSMWorld::Collection< CSMWorld::Cell >, CSMWorld::Collection< CellRef >, CSMWorld::Collection< Info, IdAccessor< Info > >, CSMWorld::Collection< CSMWorld::MetaData >, and CSMWorld::RefIdCollection.