1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-01 00:32:52 +00:00
OpenMW/apps/opencs/model/world/nestedtablewrapper.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
708 B
C++
Raw Normal View History

#ifndef CSM_WOLRD_NESTEDTABLEWRAPPER_H
#define CSM_WOLRD_NESTEDTABLEWRAPPER_H
namespace CSMWorld
{
struct NestedTableWrapperBase
{
virtual ~NestedTableWrapperBase();
2022-09-22 21:26:05 +03:00
2014-07-20 22:39:39 +02:00
virtual int size() const;
2022-09-22 21:26:05 +03:00
NestedTableWrapperBase();
};
2022-09-22 21:26:05 +03:00
template <typename NestedTable>
struct NestedTableWrapper : public NestedTableWrapperBase
{
NestedTable mNestedTable;
NestedTableWrapper(const NestedTable& nestedTable)
2022-09-22 21:26:05 +03:00
: mNestedTable(nestedTable)
{
}
~NestedTableWrapper() override {}
2014-07-20 22:39:39 +02:00
int size() const override
2014-07-20 22:39:39 +02:00
{
2022-09-22 21:26:05 +03:00
return mNestedTable.size(); // i hope that this will be enough
2014-07-20 22:39:39 +02:00
}
};
}
#endif