mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 15:39:02 +00:00
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
|
#ifndef CSM_WOLRD_IDADAPTER_H
|
||
|
#define CSM_WOLRD_IDADAPTER_H
|
||
|
|
||
|
#include "record.hpp"
|
||
|
|
||
|
class QVariant;
|
||
|
|
||
|
namespace CSMWorld
|
||
|
{
|
||
|
class NestedTableWrapperBase;
|
||
|
|
||
|
template<typename ESXRecordT>
|
||
|
class NestedIdAdapter
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
NestedIdAdapter() {}
|
||
|
|
||
|
virtual ~NestedIdAdapter() {}
|
||
|
|
||
|
virtual void addNestedRow(Record<ESXRecordT>& record, int position) const = 0;
|
||
|
|
||
|
virtual void removeNestedRow(Record<ESXRecordT>& record, int rowToRemove) const = 0;
|
||
|
|
||
|
virtual void setNestedTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) = 0;
|
||
|
|
||
|
virtual NestedTableWrapperBase* nestedTable(const Record<ESXRecordT>& record) const = 0;
|
||
|
|
||
|
virtual QVariant getNestedData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const = 0;
|
||
|
|
||
|
virtual void setNestedData(Record<ESXRecordT>& record, const QVariant& value, int subRowIndex, int subColIndex) const = 0;
|
||
|
|
||
|
virtual int getNestedColumnsCount(const Record<ESXRecordT>& record) const = 0;
|
||
|
|
||
|
virtual int getNestedRowsCount(const Record<ESXRecordT>& record) const = 0;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif // CSM_WOLRD_IDADAPTER_H
|