2014-07-18 16:26:22 +00:00
|
|
|
#ifndef CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
|
|
#define CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
struct NestedTableWrapperBase
|
|
|
|
{
|
|
|
|
virtual ~NestedTableWrapperBase();
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2014-07-20 20:39:39 +00:00
|
|
|
virtual int size() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2014-07-18 16:26:22 +00:00
|
|
|
NestedTableWrapperBase();
|
|
|
|
};
|
2022-09-22 18:26:05 +00:00
|
|
|
|
|
|
|
template <typename NestedTable>
|
2014-07-20 16:52:35 +00:00
|
|
|
struct NestedTableWrapper : public NestedTableWrapperBase
|
2014-07-18 16:26:22 +00:00
|
|
|
{
|
|
|
|
NestedTable mNestedTable;
|
|
|
|
|
2014-07-20 16:52:35 +00:00
|
|
|
NestedTableWrapper(const NestedTable& nestedTable)
|
2022-09-22 18:26:05 +00:00
|
|
|
: mNestedTable(nestedTable)
|
|
|
|
{
|
|
|
|
}
|
2014-07-18 16:26:22 +00:00
|
|
|
|
2021-05-19 00:53:55 +00:00
|
|
|
~NestedTableWrapper() override {}
|
2014-07-20 20:39:39 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
int size() const override
|
2014-07-20 20:39:39 +00:00
|
|
|
{
|
2022-09-22 18:26:05 +00:00
|
|
|
return mNestedTable.size(); // i hope that this will be enough
|
2014-07-20 20:39:39 +00:00
|
|
|
}
|
2014-07-18 16:26:22 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|