fixed pathgrid loading
parent
f4c9897bbd
commit
be3b229a5f
@ -0,0 +1,38 @@
|
|||||||
|
#ifndef CSM_WOLRD_SUBCOLLECTION_H
|
||||||
|
#define CSM_WOLRD_SUBCOLLECTION_H
|
||||||
|
|
||||||
|
#include "idcollection.hpp"
|
||||||
|
|
||||||
|
namespace CSMWorld
|
||||||
|
{
|
||||||
|
/// \brief Single type collection of top level records that are associated with cells
|
||||||
|
template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> >
|
||||||
|
class SubCellCollection : public IdCollection<ESXRecordT, IdAccessorT>
|
||||||
|
{
|
||||||
|
const IdCollection<Cell>& mCells;
|
||||||
|
|
||||||
|
virtual void loadRecord (ESXRecordT& record, ESM::ESMReader& reader);
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
SubCellCollection (const IdCollection<Cell>& cells);
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename ESXRecordT, typename IdAccessorT>
|
||||||
|
void SubCellCollection<ESXRecordT, IdAccessorT>::loadRecord (ESXRecordT& record,
|
||||||
|
ESM::ESMReader& reader)
|
||||||
|
{
|
||||||
|
record.load (reader, mCells);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename ESXRecordT, typename IdAccessorT>
|
||||||
|
SubCellCollection<ESXRecordT, IdAccessorT>::SubCellCollection (
|
||||||
|
const IdCollection<Cell>& cells)
|
||||||
|
: mCells (cells)
|
||||||
|
{}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue