OpenMW
|
Single-type record collection. More...
#include <collection.hpp>
Public Types | |
typedef ESXRecordT | ESXRecord |
Public Member Functions | |
Collection () | |
virtual | ~Collection () |
void | add (const ESXRecordT &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 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 < ESXRecordT > & | getRecord (const std::string &id) const |
virtual const Record < ESXRecordT > & | getRecord (int index) const |
virtual int | getAppendIndex (const std::string &id, UniversalId::Type type=UniversalId::Type_None) 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) |
virtual bool | reorderRows (int baseIndex, const std::vector< int > &newOrder) |
void | addColumn (Column< ESXRecordT > *column) |
void | setRecord (int index, const Record< ESXRecordT > &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 |
Protected Member Functions | |
const std::map< std::string, int > & | getIdMap () const |
const std::vector< Record < ESXRecordT > > & | getRecords () const |
bool | reorderRowsImp (int baseIndex, const std::vector< int > &newOrder) |
Private Member Functions | |
Collection (const Collection &) | |
Collection & | operator= (const Collection &) |
Private Attributes | |
std::vector< Record< ESXRecordT > > | mRecords |
std::map< std::string, int > | mIndex |
std::vector< Column < ESXRecordT > * > | mColumns |
Single-type record collection.
typedef ESXRecordT CSMWorld::Collection< ESXRecordT, IdAccessorT >::ESXRecord |
|
private |
CSMWorld::Collection< ESXRecordT, IdAccessorT >::Collection | ( | ) |
|
virtual |
void CSMWorld::Collection< ESXRecordT, IdAccessorT >::add | ( | const ESXRecordT & | record | ) |
Add a new record (modified)
void CSMWorld::Collection< ESXRecordT, IdAccessorT >::addColumn | ( | Column< ESXRecordT > * | column | ) |
|
virtual |
type | Will be ignored, unless the collection supports multiple record types |
Implements CSMWorld::CollectionBase.
|
virtual |
If the record type does not match, an exception is thrown.
type | Will be ignored, unless the collection supports multiple record types |
Implements CSMWorld::CollectionBase.
|
virtual |
|
virtual |
type | Will be ignored, unless the collection supports multiple record types |
Implements CSMWorld::CollectionBase.
Reimplemented in CSMWorld::InfoCollection.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Implements CSMWorld::CollectionBase.
|
protected |
|
virtual |
Return a sorted collection of all IDs
listDeleted | include deleted record in the list |
Implements CSMWorld::CollectionBase.
|
virtual |
Implements CSMWorld::CollectionBase.
NestableColumn * CSMWorld::Collection< ESXRecordT, IdAccessorT >::getNestableColumn | ( | int | column | ) | const |
|
virtual |
|
virtual |
Implements CSMWorld::CollectionBase.
|
protected |
|
virtual |
|
virtual |
Insert record before index.
If the record type does not match, an exception is thrown.
If the index is invalid either generally (by being out of range) or for the particular record, an exception is thrown.
|
virtual |
Merge modified into base.
|
private |
|
virtual |
Remove records that are flagged as erased.
|
virtual |
< Merge modified into base.
< Remove records that are flagged as erased.
Implements CSMWorld::CollectionBase.
|
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).
Implements CSMWorld::CollectionBase.
Reimplemented in CSMWorld::InfoCollection.
|
protected |
Reorder the rows [baseIndex, baseIndex+newOrder.size()) according to the indices given in newOrder (baseIndex+newOrder[0] specifies the new index of row baseIndex).
|
virtual |
If the record type does not match, an exception is thrown.
Implements CSMWorld::CollectionBase.
|
virtual |
Search record with id.
Implements CSMWorld::CollectionBase.
|
virtual |
Implements CSMWorld::CollectionBase.
void CSMWorld::Collection< ESXRecordT, IdAccessorT >::setRecord | ( | int | index, |
const Record< ESXRecordT > & | record | ||
) |
|
private |
|
private |
|
private |