2015-04-09 09:29:03 +00:00
|
|
|
#ifndef CSM_WOLRD_IDADAPTER_H
|
|
|
|
#define CSM_WOLRD_IDADAPTER_H
|
|
|
|
|
|
|
|
#include "record.hpp"
|
|
|
|
|
|
|
|
class QVariant;
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
2015-04-09 10:53:41 +00:00
|
|
|
struct NestedTableWrapperBase;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2015-04-11 01:26:29 +00:00
|
|
|
virtual void setNestedTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const = 0;
|
2015-04-09 09:29:03 +00:00
|
|
|
|
|
|
|
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
|