1 #ifndef CSM_WOLRD_IDCOLLECTION_H
2 #define CSM_WOLRD_IDCOLLECTION_H
11 template<
typename ESXRecordT,
typename IdAccessorT = IdAccessor<ESXRecordT> >
26 int load (
const ESXRecordT& record,
bool base,
int index = -2);
34 template<
typename ESXRecordT,
typename IdAccessorT>
39 record.load (reader, isDeleted);
42 template<
typename ESXRecordT,
typename IdAccessorT>
46 bool isDeleted =
false;
48 loadRecord (record, reader, isDeleted);
50 std::string
id = IdAccessorT().getId (record);
65 this->removeRows (index, 1);
71 this->setRecord (index, baseRecord);
75 return load (record, base, index);
78 template<
typename ESXRecordT,
typename IdAccessorT>
92 index = this->getSize();
93 this->appendRecord (record2);
101 record2.
mBase = record;
105 this->setRecord (index, record2);
111 template<
typename ESXRecordT,
typename IdAccessorT>
131 this->setRecord (index, record);
Single type collection of top level records.
Definition: idcollection.hpp:12
virtual void loadRecord(ESXRecordT &record, ESM::ESMReader &reader, bool &isDeleted)
Definition: idcollection.hpp:35
int getId(const std::string &name)
Will return -1 for an invalid name.
Definition: columns.cpp:377
State mState
Definition: record.hpp:19
Definition: esmreader.hpp:21
Single-type record collection.
Definition: collection.hpp:44
int load(ESM::ESMReader &reader, bool base)
Definition: idcollection.hpp:43
virtual const Record< ESXRecordT > & getRecord(const std::string &id) const
Definition: collection.hpp:430
MWWorld::Ptr searchId(MWWorld::CellRefList< T > &list, const std::string &id, MWWorld::ContainerStore *store)
Definition: containerstore.cpp:42
Definition: nestedcolumnadapter.hpp:11
ESXRecordT mBase
Definition: record.hpp:40
Definition: record.hpp:14
Definition: record.hpp:12
Definition: record.hpp:15
ESXRecordT mModified
Definition: record.hpp:41
virtual void removeRows(int index, int count)
< Merge modified into base.
Definition: collection.hpp:339
void setModified(const ESXRecordT &modified)
Throws an exception, if the record is deleted.
Definition: record.hpp:133
bool tryDelete(const std::string &id)
Definition: idcollection.hpp:112
bool isDeleted() const
Definition: record.cpp:5