2013-07-06 17:03:18 +02:00
|
|
|
#ifndef CSM_WOLRD_REFCOLLECTION_H
|
|
|
|
#define CSM_WOLRD_REFCOLLECTION_H
|
|
|
|
|
2014-05-20 09:02:22 +02:00
|
|
|
#include <map>
|
|
|
|
|
2014-05-20 09:28:18 +02:00
|
|
|
#include "../doc/stage.hpp"
|
|
|
|
|
2013-07-06 17:03:18 +02:00
|
|
|
#include "collection.hpp"
|
|
|
|
#include "ref.hpp"
|
|
|
|
#include "record.hpp"
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
struct Cell;
|
2014-01-21 21:37:21 +01:00
|
|
|
struct UniversalId;
|
2013-07-06 17:03:18 +02:00
|
|
|
|
|
|
|
/// \brief References in cells
|
|
|
|
class RefCollection : public Collection<CellRef>
|
|
|
|
{
|
|
|
|
Collection<Cell>& mCells;
|
|
|
|
int mNextId;
|
|
|
|
|
|
|
|
public:
|
2013-09-05 10:39:17 +02:00
|
|
|
// MSVC needs the constructor for a class inheriting a template to be defined in header
|
2013-09-04 23:25:47 +02:00
|
|
|
RefCollection (Collection<Cell>& cells)
|
|
|
|
: mCells (cells), mNextId (0)
|
|
|
|
{}
|
2013-07-06 17:03:18 +02:00
|
|
|
|
2014-05-20 09:02:22 +02:00
|
|
|
void load (ESM::ESMReader& reader, int cellIndex, bool base,
|
2014-05-30 10:38:38 +02:00
|
|
|
std::map<ESM::RefNum, std::string>& cache,
|
2014-05-20 09:28:18 +02:00
|
|
|
CSMDoc::Stage::Messages& messages);
|
2013-07-06 17:03:18 +02:00
|
|
|
///< Load a sequence of references.
|
2013-07-30 12:53:03 +02:00
|
|
|
|
|
|
|
std::string getNewId();
|
2013-07-06 17:03:18 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|