OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CSMWorld::RefIdCollection Class Reference

#include <refidcollection.hpp>

Inheritance diagram for CSMWorld::RefIdCollection:
Collaboration diagram for CSMWorld::RefIdCollection:

Public Member Functions

 RefIdCollection ()
 
virtual ~RefIdCollection ()
 
virtual int getSize () const
 
virtual std::string getId (int index) const
 
virtual int getIndex (const std::string &id) const
 
virtual int getColumns () const
 
virtual const ColumnBasegetColumn (int column) const
 
virtual QVariant getData (int index, int column) const
 
virtual void setData (int index, int column, const QVariant &data)
 
virtual void removeRows (int index, int count)
 < Merge modified into base. More...
 
virtual void cloneRecord (const std::string &origin, const std::string &destination, const UniversalId::Type type)
 
virtual void appendBlankRecord (const std::string &id, 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)
 
virtual const RecordBasegetRecord (const std::string &id) const
 
virtual const RecordBasegetRecord (int index) const
 
void load (ESM::ESMReader &reader, bool base, UniversalId::Type type)
 
virtual int getAppendIndex (const std::string &id, UniversalId::Type type) const
 
virtual std::vector< std::string > getIds (bool listDeleted) const
 
virtual bool reorderRows (int baseIndex, const std::vector< int > &newOrder)
 
virtual QVariant getNestedData (int row, int column, int subRow, int subColumn) const
 
virtual NestedTableWrapperBasenestedTable (int row, int column) const
 
virtual void setNestedTable (int row, int column, const NestedTableWrapperBase &nestedTable)
 
virtual int getNestedRowsCount (int row, int column) const
 
virtual int getNestedColumnsCount (int row, int column) const
 
NestableColumngetNestableColumn (int column)
 
virtual void setNestedData (int row, int column, const QVariant &data, int subRow, int subColumn)
 
virtual void removeNestedRows (int row, int column, int subRow)
 
virtual void addNestedRow (int row, int col, int position)
 
void save (int index, ESM::ESMWriter &writer) const
 
const RefIdDatagetDataSet () const
 
void copyTo (int index, RefIdCollection &target) 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
 
- Public Member Functions inherited from CSMWorld::NestedCollection
 NestedCollection ()
 
virtual ~NestedCollection ()
 
virtual int searchNestedColumnIndex (int parentColumn, Columns::ColumnId id)
 
virtual int findNestedColumnIndex (int parentColumn, Columns::ColumnId id)
 

Private Member Functions

const RefIdAdapterfindAdapter (UniversalId::Type) const
 Throws an exception if no adaptor for Type can be found. More...
 
const NestedRefIdAdapterBasegetNestedAdapter (const ColumnBase &column, UniversalId::Type type) const
 

Private Attributes

RefIdData mData
 
std::deque< RefIdColumnmColumns
 
std::map< UniversalId::Type,
RefIdAdapter * > 
mAdapters
 
std::vector< std::pair< const
ColumnBase *, std::map
< UniversalId::Type,
NestedRefIdAdapterBase * > > > 
mNestedAdapters
 

Constructor & Destructor Documentation

CSMWorld::RefIdCollection::RefIdCollection ( )
CSMWorld::RefIdCollection::~RefIdCollection ( )
virtual

Member Function Documentation

void CSMWorld::RefIdCollection::addNestedRow ( int  row,
int  col,
int  position 
)
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

void CSMWorld::RefIdCollection::appendBlankRecord ( const std::string &  id,
UniversalId::Type  type 
)
virtual
Parameters
typeWill be ignored, unless the collection supports multiple record types

Implements CSMWorld::CollectionBase.

void CSMWorld::RefIdCollection::appendRecord ( const RecordBase record,
UniversalId::Type  type 
)
virtual

If the record type does not match, an exception is thrown.

Parameters
typeWill be ignored, unless the collection supports multiple record types

Implements CSMWorld::CollectionBase.

void CSMWorld::RefIdCollection::cloneRecord ( const std::string &  origin,
const std::string &  destination,
const UniversalId::Type  type 
)
virtual
void CSMWorld::RefIdCollection::copyTo ( int  index,
RefIdCollection target 
) const
const CSMWorld::RefIdAdapter & CSMWorld::RefIdCollection::findAdapter ( UniversalId::Type  type) const
private

Throws an exception if no adaptor for Type can be found.

int CSMWorld::RefIdCollection::getAppendIndex ( const std::string &  id,
UniversalId::Type  type 
) const
virtual
Parameters
typeWill be ignored, unless the collection supports multiple record types

Implements CSMWorld::CollectionBase.

const CSMWorld::ColumnBase & CSMWorld::RefIdCollection::getColumn ( int  column) const
virtual
int CSMWorld::RefIdCollection::getColumns ( ) const
virtual
QVariant CSMWorld::RefIdCollection::getData ( int  index,
int  column 
) const
virtual

Implements CSMWorld::CollectionBase.

Here is the call graph for this function:

Here is the caller graph for this function:

const CSMWorld::RefIdData & CSMWorld::RefIdCollection::getDataSet ( ) const
std::string CSMWorld::RefIdCollection::getId ( int  index) const
virtual

Implements CSMWorld::CollectionBase.

Here is the call graph for this function:

std::vector< std::string > CSMWorld::RefIdCollection::getIds ( bool  listDeleted) const
virtual

Return a sorted collection of all IDs

Parameters
listDeletedinclude deleted record in the list

Implements CSMWorld::CollectionBase.

int CSMWorld::RefIdCollection::getIndex ( const std::string &  id) const
virtual

Implements CSMWorld::CollectionBase.

Here is the call graph for this function:

CSMWorld::NestableColumn * CSMWorld::RefIdCollection::getNestableColumn ( int  column)
virtual
const CSMWorld::NestedRefIdAdapterBase & CSMWorld::RefIdCollection::getNestedAdapter ( const ColumnBase column,
UniversalId::Type  type 
) const
private
int CSMWorld::RefIdCollection::getNestedColumnsCount ( int  row,
int  column 
) const
virtual

Reimplemented from CSMWorld::NestedCollection.

Here is the call graph for this function:

QVariant CSMWorld::RefIdCollection::getNestedData ( int  row,
int  column,
int  subRow,
int  subColumn 
) const
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

int CSMWorld::RefIdCollection::getNestedRowsCount ( int  row,
int  column 
) const
virtual

Reimplemented from CSMWorld::NestedCollection.

Here is the call graph for this function:

const CSMWorld::RecordBase & CSMWorld::RefIdCollection::getRecord ( const std::string &  id) const
virtual

Implements CSMWorld::CollectionBase.

Here is the caller graph for this function:

const CSMWorld::RecordBase & CSMWorld::RefIdCollection::getRecord ( int  index) const
virtual
int CSMWorld::RefIdCollection::getSize ( ) const
virtual
void CSMWorld::RefIdCollection::load ( ESM::ESMReader reader,
bool  base,
UniversalId::Type  type 
)
CSMWorld::NestedTableWrapperBase * CSMWorld::RefIdCollection::nestedTable ( int  row,
int  column 
) const
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

void CSMWorld::RefIdCollection::removeNestedRows ( int  row,
int  column,
int  subRow 
)
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

void CSMWorld::RefIdCollection::removeRows ( int  index,
int  count 
)
virtual

< Merge modified into base.

< Remove records that are flagged as erased.

Implements CSMWorld::CollectionBase.

bool CSMWorld::RefIdCollection::reorderRows ( int  baseIndex,
const std::vector< int > &  newOrder 
)
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).

Returns
Success?

Implements CSMWorld::CollectionBase.

void CSMWorld::RefIdCollection::replace ( int  index,
const RecordBase record 
)
virtual

If the record type does not match, an exception is thrown.

Attention
record must not change the ID.

Implements CSMWorld::CollectionBase.

void CSMWorld::RefIdCollection::save ( int  index,
ESM::ESMWriter writer 
) const
int CSMWorld::RefIdCollection::searchId ( const std::string &  id) const
virtual

Search record with id.

Returns
index of record (if found) or -1 (not found)

Implements CSMWorld::CollectionBase.

Here is the caller graph for this function:

void CSMWorld::RefIdCollection::setData ( int  index,
int  column,
const QVariant &  data 
)
virtual

Implements CSMWorld::CollectionBase.

Here is the call graph for this function:

void CSMWorld::RefIdCollection::setNestedData ( int  row,
int  column,
const QVariant &  data,
int  subRow,
int  subColumn 
)
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

void CSMWorld::RefIdCollection::setNestedTable ( int  row,
int  column,
const NestedTableWrapperBase nestedTable 
)
virtual

Implements CSMWorld::NestedCollection.

Here is the call graph for this function:

Member Data Documentation

std::map<UniversalId::Type, RefIdAdapter *> CSMWorld::RefIdCollection::mAdapters
private
std::deque<RefIdColumn> CSMWorld::RefIdCollection::mColumns
private
RefIdData CSMWorld::RefIdCollection::mData
private
std::vector<std::pair<const ColumnBase*, std::map<UniversalId::Type, NestedRefIdAdapterBase*> > > CSMWorld::RefIdCollection::mNestedAdapters
private

The documentation for this class was generated from the following files: