|
|
|
@ -45,7 +45,7 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
virtual RecordBase& getRecord (int index)= 0;
|
|
|
|
|
|
|
|
|
|
virtual void appendRecord (const std::string& id) = 0;
|
|
|
|
|
virtual void appendRecord (const std::string& id, bool base) = 0;
|
|
|
|
|
|
|
|
|
|
virtual void insertRecord (RecordBase& record) = 0;
|
|
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
virtual RecordBase& getRecord (int index);
|
|
|
|
|
|
|
|
|
|
virtual void appendRecord (const std::string& id);
|
|
|
|
|
virtual void appendRecord (const std::string& id, bool base);
|
|
|
|
|
|
|
|
|
|
virtual void insertRecord (RecordBase& record);
|
|
|
|
|
|
|
|
|
@ -108,12 +108,15 @@ namespace CSMWorld
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<typename RecordT>
|
|
|
|
|
void RefIdDataContainer<RecordT>::appendRecord (const std::string& id)
|
|
|
|
|
void RefIdDataContainer<RecordT>::appendRecord (const std::string& id, bool base)
|
|
|
|
|
{
|
|
|
|
|
Record<RecordT> record;
|
|
|
|
|
|
|
|
|
|
record.mState = base ? RecordBase::State_BaseOnly : RecordBase::State_ModifiedOnly;
|
|
|
|
|
|
|
|
|
|
record.mBase.mId = id;
|
|
|
|
|
record.mModified.mId = id;
|
|
|
|
|
record.mModified.blank();
|
|
|
|
|
record.mState = RecordBase::State_ModifiedOnly;
|
|
|
|
|
(base ? record.mBase : record.mModified).blank();
|
|
|
|
|
|
|
|
|
|
mContainer.push_back (record);
|
|
|
|
|
}
|
|
|
|
@ -213,7 +216,7 @@ namespace CSMWorld
|
|
|
|
|
|
|
|
|
|
RecordBase& getRecord (const LocalIndex& index);
|
|
|
|
|
|
|
|
|
|
void appendRecord (UniversalId::Type type, const std::string& id);
|
|
|
|
|
void appendRecord (UniversalId::Type type, const std::string& id, bool base);
|
|
|
|
|
|
|
|
|
|
int getAppendIndex (UniversalId::Type type) const;
|
|
|
|
|
|
|
|
|
|