1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 15:53:54 +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 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
NestedTableWrapperBase();
};
2022-09-22 18:26:05 +00:00
template <typename NestedTable>
struct NestedTableWrapper : public NestedTableWrapperBase
{
NestedTable mNestedTable;
NestedTableWrapper(const NestedTable& nestedTable)
2022-09-22 18:26:05 +00:00
: mNestedTable(nestedTable)
{
}
~NestedTableWrapper() override {}
2014-07-20 20:39:39 +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
}
};
}
#endif