add getIdValidatorResult method to GenericCreator, for use in subclass

StartScriptCreator
openmw-37
artemutin@yandex.ru 9 years ago
parent e672880f64
commit 903cd3322b

@ -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,

@ -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;

Loading…
Cancel
Save