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"
|
|
|
|
|
2013-09-14 12:56:23 +00:00
|
|
|
#include "../doc/stage.hpp"
|
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;
|
|
|
|
std::vector<std::string> mIds;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2013-06-17 09:42:02 +00:00
|
|
|
MandatoryIdStage (const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
|
2012-12-08 22:27:59 +00:00
|
|
|
const std::vector<std::string>& ids);
|
|
|
|
|
|
|
|
virtual int setup();
|
|
|
|
///< \return number of steps
|
|
|
|
|
2014-12-07 17:57:47 +00:00
|
|
|
virtual void perform (int stage, CSMDoc::Messages& messages);
|
2012-12-08 22:27:59 +00:00
|
|
|
///< Messages resulting from this tage will be appended to \a messages.
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|