|
|
|
@ -34,6 +34,8 @@ namespace CSMWorld
|
|
|
|
|
BaseRefIdAdapter (UniversalId::Type type, const BaseColumns& base);
|
|
|
|
|
|
|
|
|
|
virtual std::string getId (const RecordBase& record) const;
|
|
|
|
|
|
|
|
|
|
virtual void setId (RecordBase& record, const std::string& id);
|
|
|
|
|
|
|
|
|
|
virtual QVariant getData (const RefIdColumn *column, const RefIdData& data, int index)
|
|
|
|
|
const;
|
|
|
|
@ -50,6 +52,12 @@ namespace CSMWorld
|
|
|
|
|
: mType (type), mBase (base)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
template<typename RecordT>
|
|
|
|
|
void BaseRefIdAdapter<RecordT>::setId (RecordBase& record, const std::string& id)
|
|
|
|
|
{
|
|
|
|
|
(dynamic_cast<Record<RecordT>&> (record).get().mId) = id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template<typename RecordT>
|
|
|
|
|
std::string BaseRefIdAdapter<RecordT>::getId (const RecordBase& record) const
|
|
|
|
|
{
|
|
|
|
|