2014-07-18 16:26:22 +00:00
|
|
|
#ifndef CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
|
|
#define CSM_WOLRD_NESTEDTABLEWRAPPER_H
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
struct NestedTableWrapperBase
|
|
|
|
{
|
|
|
|
virtual ~NestedTableWrapperBase();
|
|
|
|
|
2014-07-20 20:39:39 +00:00
|
|
|
virtual int size() const;
|
|
|
|
|
2014-07-18 16:26:22 +00:00
|
|
|
NestedTableWrapperBase();
|
|
|
|
};
|
2014-07-20 20:39:39 +00:00
|
|
|
|
2014-07-18 16:26:22 +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)
|
2014-07-19 11:08:28 +00:00
|
|
|
: mNestedTable(nestedTable) {}
|
2014-07-18 16:26:22 +00:00
|
|
|
|
|
|
|
virtual ~NestedTableWrapper() {}
|
2014-07-20 20:39:39 +00:00
|
|
|
|
|
|
|
virtual int size() const
|
|
|
|
{
|
|
|
|
return mNestedTable.size(); //i hope that this will be enough
|
|
|
|
}
|
2014-07-18 16:26:22 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|