1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 00:53:53 +00:00
openmw/apps/opencs/model/tools/mandatoryid.hpp
2022-10-31 21:04:01 +01:00

42 lines
966 B
C++

#ifndef CSM_TOOLS_MANDATORYID_H
#define CSM_TOOLS_MANDATORYID_H
#include <string>
#include <vector>
#include "../world/universalid.hpp"
#include "../doc/stage.hpp"
namespace CSMDoc
{
class Messages;
}
namespace CSMWorld
{
class CollectionBase;
}
namespace CSMTools
{
/// \brief Verify stage: make sure that records with specific IDs exist.
class MandatoryIdStage : public CSMDoc::Stage
{
const CSMWorld::CollectionBase& mIdCollection;
CSMWorld::UniversalId mCollectionId;
std::vector<std::string> mIds;
public:
MandatoryIdStage(const CSMWorld::CollectionBase& idCollection, const CSMWorld::UniversalId& collectionId,
const std::vector<std::string>& ids);
int setup() override;
///< \return number of steps
void perform(int stage, CSMDoc::Messages& messages) override;
///< Messages resulting from this tage will be appended to \a messages.
};
}
#endif