1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-28 14:53:58 +00:00

add getIdValidatorResult method to GenericCreator, for use in subclass

StartScriptCreator

(cherry picked from commit 903cd3322b2a24e4d0a757ede8e429583f34f2b4)
This commit is contained in:
artemutin@yandex.ru 2015-09-29 22:44:25 +10:00 committed by cc9cii
parent b0018aa791
commit 7f46bc155a
2 changed files with 12 additions and 0 deletions

View File

@ -47,6 +47,16 @@ std::string CSVWorld::GenericCreator::getId() const
return mId->text().toUtf8().constData();
}
std::string CSVWorld::GenericCreator::getIdValidatorResult() const
{
std::string errors;
if (!mId->hasAcceptableInput())
errors = mValidator->getError();
return errors;
}
void CSVWorld::GenericCreator::configureCreateCommand (CSMWorld::CreateCommand& command) const {}
void CSVWorld::GenericCreator::pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command,

View File

@ -60,6 +60,8 @@ namespace CSVWorld
virtual std::string getId() const;
virtual std::string getIdValidatorResult() const;
/// Allow subclasses to add additional data to \a command.
virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const;