OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
nestedcolumnadapter.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_NESTEDCOLUMNADAPTER_H
2 #define CSM_WOLRD_NESTEDCOLUMNADAPTER_H
3 
4 class QVariant;
5 
6 namespace CSMWorld
7 {
8  struct NestedTableWrapperBase;
9 
10  template <typename ESXRecordT>
11  struct Record;
12 
13  template<typename ESXRecordT>
15  {
16  public:
17 
19 
20  virtual ~NestedColumnAdapter() {}
21 
22  virtual void addRow(Record<ESXRecordT>& record, int position) const = 0;
23 
24  virtual void removeRow(Record<ESXRecordT>& record, int rowToRemove) const = 0;
25 
26  virtual void setTable(Record<ESXRecordT>& record, const NestedTableWrapperBase& nestedTable) const = 0;
27 
28  virtual NestedTableWrapperBase* table(const Record<ESXRecordT>& record) const = 0;
29 
30  virtual QVariant getData(const Record<ESXRecordT>& record, int subRowIndex, int subColIndex) const = 0;
31 
32  virtual void setData(Record<ESXRecordT>& record, const QVariant& value, int subRowIndex, int subColIndex) const = 0;
33 
34  virtual int getColumnsCount(const Record<ESXRecordT>& record) const = 0;
35 
36  virtual int getRowsCount(const Record<ESXRecordT>& record) const = 0;
37  };
38 }
39 
40 #endif // CSM_WOLRD_NESTEDCOLUMNADAPTER_H
Definition: nestedtablewrapper.hpp:6
virtual ~NestedColumnAdapter()
Definition: nestedcolumnadapter.hpp:20
virtual void setData(Record< ESXRecordT > &record, const QVariant &value, int subRowIndex, int subColIndex) const =0
virtual QVariant getData(const Record< ESXRecordT > &record, int subRowIndex, int subColIndex) const =0
virtual int getRowsCount(const Record< ESXRecordT > &record) const =0
virtual void setTable(Record< ESXRecordT > &record, const NestedTableWrapperBase &nestedTable) const =0
Definition: nestedcolumnadapter.hpp:11
virtual void addRow(Record< ESXRecordT > &record, int position) const =0
virtual int getColumnsCount(const Record< ESXRecordT > &record) const =0
Definition: nestedcolumnadapter.hpp:14
NestedColumnAdapter()
Definition: nestedcolumnadapter.hpp:18
virtual NestedTableWrapperBase * table(const Record< ESXRecordT > &record) const =0
virtual void removeRow(Record< ESXRecordT > &record, int rowToRemove) const =0