OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
nestedinfocollection.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_NESTEDINFOCOLLECTION_H
2 #define CSM_WOLRD_NESTEDINFOCOLLECTION_H
3 
4 #include <map>
5 
6 #include "infocollection.hpp"
7 #include "nestedcollection.hpp"
8 
9 namespace CSMWorld
10 {
11  struct NestedTableWrapperBase;
12 
13  template<typename ESXRecordT>
14  class NestedColumnAdapter;
15 
17  {
18  std::map<const ColumnBase*, NestedColumnAdapter<Info>* > mAdapters;
19 
20  const NestedColumnAdapter<Info>& getAdapter(const ColumnBase &column) const;
21 
22  public:
23 
26 
27  virtual void addNestedRow(int row, int column, int position);
28 
29  virtual void removeNestedRows(int row, int column, int subRow);
30 
31  virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const;
32 
33  virtual void setNestedData(int row, int column, const QVariant& data, int subRow, int subColumn);
34 
35  virtual NestedTableWrapperBase* nestedTable(int row, int column) const;
36 
37  virtual void setNestedTable(int row, int column, const NestedTableWrapperBase& nestedTable);
38 
39  virtual int getNestedRowsCount(int row, int column) const;
40 
41  virtual int getNestedColumnsCount(int row, int column) const;
42 
43  // this method is inherited from NestedCollection, not from Collection<Info, IdAccessor<Info> >
44  virtual NestableColumn *getNestableColumn(int column);
45 
46  void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<Info>* > adapter);
47  };
48 }
49 
50 #endif // CSM_WOLRD_NESTEDINFOCOLLECTION_H
Definition: nestedtablewrapper.hpp:6
virtual int getNestedColumnsCount(int row, int column) const
Definition: nestedinfocollection.cpp:100
NestedInfoCollection()
Definition: nestedinfocollection.cpp:7
virtual void setNestedTable(int row, int column, const NestedTableWrapperBase &nestedTable)
Definition: nestedinfocollection.cpp:82
Definition: columnbase.hpp:167
Definition: infocollection.hpp:14
const NestedColumnAdapter< Info > & getAdapter(const ColumnBase &column) const
Definition: nestedinfocollection.cpp:25
virtual void removeNestedRows(int row, int column, int subRow)
Definition: nestedinfocollection.cpp:46
virtual NestedTableWrapperBase * nestedTable(int row, int column) const
Definition: nestedinfocollection.cpp:75
virtual void addNestedRow(int row, int column, int position)
Definition: nestedinfocollection.cpp:36
virtual NestableColumn * getNestableColumn(int column)
Definition: nestedinfocollection.cpp:106
~NestedInfoCollection()
Definition: nestedinfocollection.cpp:10
Definition: nestedinfocollection.hpp:16
virtual void setNestedData(int row, int column, const QVariant &data, int subRow, int subColumn)
Definition: nestedinfocollection.cpp:63
virtual QVariant getNestedData(int row, int column, int subRow, int subColumn) const
Definition: nestedinfocollection.cpp:56
virtual int getNestedRowsCount(int row, int column) const
Definition: nestedinfocollection.cpp:94
Definition: columnbase.hpp:15
void addAdapter(std::pair< const ColumnBase *, NestedColumnAdapter< Info > * > adapter)
Definition: nestedinfocollection.cpp:19
std::map< const ColumnBase *, NestedColumnAdapter< Info > * > mAdapters
Definition: nestedinfocollection.hpp:18
Definition: nestedcollection.hpp:13