mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 15:39:02 +00:00
34 lines
736 B
C++
34 lines
736 B
C++
#ifndef CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
#define CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
|
|
namespace CSMWorld
|
|
{
|
|
struct NestedTableWrapperBase
|
|
{
|
|
virtual ~NestedTableWrapperBase() = default;
|
|
|
|
virtual int size() const;
|
|
|
|
NestedTableWrapperBase() = default;
|
|
};
|
|
|
|
template <typename NestedTable>
|
|
struct NestedTableWrapper : public NestedTableWrapperBase
|
|
{
|
|
NestedTable mNestedTable;
|
|
|
|
NestedTableWrapper(const NestedTable& nestedTable)
|
|
: mNestedTable(nestedTable)
|
|
{
|
|
}
|
|
|
|
~NestedTableWrapper() override = default;
|
|
|
|
int size() const override
|
|
{
|
|
return mNestedTable.size(); // i hope that this will be enough
|
|
}
|
|
};
|
|
}
|
|
#endif
|