2012-12-08 22:27:59 +00:00
|
|
|
#ifndef CSM_TOOLS_MANDATORYID_H
|
|
|
|
#define CSM_TOOLS_MANDATORYID_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "../world/universalid.hpp"
|
2022-10-06 17:39:46 +00:00
|
|
|
#include <components/esm/refid.hpp>
|
2013-09-14 12:56:23 +00:00
|
|
|
#include "../doc/stage.hpp"
|
2012-12-08 22:27:59 +00:00
|
|
|
|
2022-10-19 17:02:00 +00:00
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Messages;
|
|
|
|
}
|
|
|
|
|
2012-12-08 22:27:59 +00:00
|
|
|
namespace CSMWorld
|
|
|
|
{
|
2013-06-17 09:42:02 +00:00
|
|
|
class CollectionBase;
|
2012-12-08 22:27:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSMTools
|
|
|
|
{
|
|
|
|
/// \brief Verify stage: make sure that records with specific IDs exist.
|
2013-09-14 12:56:23 +00:00
|
|
|
class MandatoryIdStage : public CSMDoc::Stage
|
2012-12-08 22:27:59 +00:00
|
|
|
{
|
2013-06-17 09:42:02 +00:00
|
|
|
const CSMWorld::CollectionBase& mIdCollection;
|
2012-12-08 22:27:59 +00:00
|
|
|
CSMWorld::UniversalId mCollectionId;
|
2022-10-06 17:39:46 +00:00
|
|
|
std::vector<ESM::RefId> mIds;
|
2012-12-08 22:27:59 +00:00
|
|
|
|
|
|
|
public:
|
2013-06-17 09:42:02 +00:00
|
|
|
MandatoryIdStage(const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
2022-10-06 17:39:46 +00:00
|
|
|
const std::vector<ESM::RefId>& ids);
|
2012-12-08 22:27:59 +00:00
|
|
|
|
|
|
|
int setup() override;
|
|
|
|
///< \return number of steps
|
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void perform(int stage, CSMDoc::Messages& messages) override;
|
2012-12-08 22:27:59 +00:00
|
|
|
///< Messages resulting from this tage will be appended to \a messages.
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|