mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	add getIdValidatorResult method to GenericCreator, for use in subclass
StartScriptCreator
This commit is contained in:
		
							parent
							
								
									e672880f64
								
							
						
					
					
						commit
						903cd3322b
					
				
					 2 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
					@ -47,6 +47,16 @@ std::string CSVWorld::GenericCreator::getId() const
 | 
				
			||||||
    return mId->text().toUtf8().constData();
 | 
					    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::configureCreateCommand (CSMWorld::CreateCommand& command) const {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CSVWorld::GenericCreator::pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command,
 | 
					void CSVWorld::GenericCreator::pushCommand (std::auto_ptr<CSMWorld::CreateCommand> command,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,6 +60,8 @@ namespace CSVWorld
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            virtual std::string getId() const;
 | 
					            virtual std::string getId() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            virtual std::string getIdValidatorResult() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /// Allow subclasses to add additional data to \a command.
 | 
					            /// Allow subclasses to add additional data to \a command.
 | 
				
			||||||
            virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const;
 | 
					            virtual void configureCreateCommand (CSMWorld::CreateCommand& command) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue