OpenMW
Public Member Functions | Private Member Functions
CSMWorld::CollectionBase Class Reference

Base class for record collections. More...

#include <collectionbase.hpp>

List of all members.

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 ColumnBasegetColumn (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.
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.
virtual const RecordBasegetRecord (const std::string &id) const =0
virtual const RecordBasegetRecord (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.
int findColumnIndex (Columns::ColumnId id) const

Private Member Functions

 CollectionBase (const CollectionBase &)
CollectionBaseoperator= (const CollectionBase &)

Detailed Description

Base class for record collections.

Attention:
Modifying records through the interface does not update connected views. Such modifications should be done through the table model interface instead unless no views are connected to the model or special precautions have been taken to send update signals manually.

Constructor & Destructor Documentation


Member Function Documentation

virtual void CSMWorld::CollectionBase::appendBlankRecord ( const std::string &  id,
UniversalId::Type  type = UniversalId::Type_None 
) [pure virtual]
virtual void CSMWorld::CollectionBase::appendRecord ( const RecordBase record,
UniversalId::Type  type = UniversalId::Type_None 
) [pure virtual]

Return index of column with the given id. If no such column exists, an exception is thrown.

virtual int CSMWorld::CollectionBase::getAppendIndex ( const std::string &  id,
UniversalId::Type  type = UniversalId::Type_None 
) const [pure virtual]
virtual const ColumnBase& CSMWorld::CollectionBase::getColumn ( int  column) const [pure virtual]
virtual int CSMWorld::CollectionBase::getColumns ( ) const [pure virtual]
virtual QVariant CSMWorld::CollectionBase::getData ( int  index,
int  column 
) const [pure virtual]
virtual std::string CSMWorld::CollectionBase::getId ( int  index) const [pure virtual]
virtual std::vector<std::string> CSMWorld::CollectionBase::getIds ( bool  listDeleted = true) const [pure virtual]
virtual int CSMWorld::CollectionBase::getIndex ( const std::string &  id) const [pure virtual]
virtual const RecordBase& CSMWorld::CollectionBase::getRecord ( const std::string &  id) const [pure virtual]
virtual const RecordBase& CSMWorld::CollectionBase::getRecord ( int  index) const [pure virtual]
virtual int CSMWorld::CollectionBase::getSize ( ) const [pure virtual]
CollectionBase& CSMWorld::CollectionBase::operator= ( const CollectionBase ) [private]
virtual void CSMWorld::CollectionBase::removeRows ( int  index,
int  count 
) [pure virtual]
virtual bool CSMWorld::CollectionBase::reorderRows ( int  baseIndex,
const std::vector< int > &  newOrder 
) [pure virtual]
virtual void CSMWorld::CollectionBase::replace ( int  index,
const RecordBase record 
) [pure virtual]

Return index of column with the given id. If no such column exists, -1 is returned.

virtual int CSMWorld::CollectionBase::searchId ( const std::string &  id) const [pure virtual]
virtual void CSMWorld::CollectionBase::setData ( int  index,
int  column,
const QVariant &  data 
) [pure virtual]

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