1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +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
736 B
C++
Raw Normal View History

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