OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | List of all members
CSMWorld::IdCollection< ESXRecordT, IdAccessorT > Class Template Reference

Single type collection of top level records. More...

#include <idcollection.hpp>

Inheritance diagram for CSMWorld::IdCollection< ESXRecordT, IdAccessorT >:
Collaboration diagram for CSMWorld::IdCollection< ESXRecordT, IdAccessorT >:

Public Member Functions

int load (ESM::ESMReader &reader, bool base)
 
int load (const ESXRecordT &record, bool base, int index=-2)
 
bool tryDelete (const std::string &id)
 
- Public Member Functions inherited from CSMWorld::Collection< ESXRecordT, IdAccessorT >
 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 ColumnBasegetColumn (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)
 
NestableColumngetNestableColumn (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

virtual void loadRecord (ESXRecordT &record, ESM::ESMReader &reader, bool &isDeleted)
 

Additional Inherited Members

- Public Types inherited from CSMWorld::Collection< ESXRecordT, IdAccessorT >
typedef ESXRecordT ESXRecord
 
- Protected Member Functions inherited from CSMWorld::Collection< ESXRecordT, IdAccessorT >
const std::map< std::string,
int > & 
getIdMap () const
 
const std::vector< Record
< ESXRecordT > > & 
getRecords () const
 
bool reorderRowsImp (int baseIndex, const std::vector< int > &newOrder)
 

Detailed Description

template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT>>
class CSMWorld::IdCollection< ESXRecordT, IdAccessorT >

Single type collection of top level records.

Member Function Documentation

template<typename ESXRecordT , typename IdAccessorT >
int CSMWorld::IdCollection< ESXRecordT, IdAccessorT >::load ( ESM::ESMReader reader,
bool  base 
)
Returns
Index of loaded record (-1 if no record was loaded)
Todo:
report the problem to the user

Here is the call graph for this function:

template<typename ESXRecordT, typename IdAccessorT >
int CSMWorld::IdCollection< ESXRecordT, IdAccessorT >::load ( const ESXRecordT &  record,
bool  base,
int  index = -2 
)
Parameters
indexIndex at which the record can be found. Special values: -2 index unknown, -1 record does not exist yet and therefore does not have an index
Returns
index

Here is the call graph for this function:

template<typename ESXRecordT, typename IdAccessorT >
void CSMWorld::IdCollection< ESXRecordT, IdAccessorT >::loadRecord ( ESXRecordT &  record,
ESM::ESMReader reader,
bool isDeleted 
)
privatevirtual
template<typename ESXRecordT , typename IdAccessorT >
bool CSMWorld::IdCollection< ESXRecordT, IdAccessorT >::tryDelete ( const std::string &  id)

Try deleting id. If the id does not exist or can't be deleted the call is ignored.

Returns
Has the ID been deleted?

Here is the call graph for this function:


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