STORM_LOG_TRACE("Created meta variables for integer variable: "<<variablePair.first.getName()<<"["<<variablePair.first.getIndex()<<"] and "<<variablePair.second.getName()<<"["<<variablePair.second.getIndex()<<"]");
STORM_LOG_TRACE("Created meta variables for boolean variable: "<<variablePair.first.getName()<<"["<<variablePair.first.getIndex()<<"] and "<<variablePair.second.getName()<<"["<<variablePair.second.getIndex()<<"]");
STORM_LOG_TRACE("Created meta variables for integer variable: "<<variablePair.first.getName()<<"["<<variablePair.first.getIndex()<<"] and "<<variablePair.second.getName()<<"["<<variablePair.second.getIndex()<<"]");
STORM_LOG_TRACE("Created meta variables for boolean variable: "<<variablePair.first.getName()<<"["<<variablePair.first.getIndex()<<"] and "<<variablePair.second.getName()<<"["<<variablePair.second.getIndex()<<"]");
STORM_LOG_THROW(this->getType()==other.getType(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because they have different types.");
STORM_LOG_THROW(this->getIsOptional()==other.getIsOptional(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments '"<<this->getName()<<"' and '"<<other.getName()<<"', because one of them is optional and the other one is not.");
STORM_LOG_THROW(this->getHasDefaultValue()==other.getHasDefaultValue(),storm::exceptions::ArgumentUnificationException,"Unable to unify the arguments "<<this->getName()<<" and "<<other.getName()<<", because one of them has a default value and the other one does not.");
STORM_LOG_THROW(this->getHasBeenSet()||this->getHasDefaultValue(),storm::exceptions::IllegalFunctionCallException,"Unable to retrieve value of argument '"<<this->getName()<<"', because it was neither set nor specifies a default value.");
if(this->getHasBeenSet()){
returnthis->argumentValue;
}else{
returnthis->defaultValue;
}
}
virtualboolgetHasDefaultValue()constoverride{
returnthis->hasDefaultValue;
}
voidsetFromDefaultValue()override{
STORM_LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to set value from default value, because the argument has none.");
default:STORM_LOG_THROW(false,storm::exceptions::IllegalFunctionCallException,"Unable to retrieve argument value as boolean.");break;
}
}
virtualboolgetValueAsBoolean()constoverride;
private:
//Thevalueoftheargument(incaseithasbeenset).
@ -199,11 +122,7 @@ namespace storm {
*
*@paramnewDefaultThenewdefaultvalueoftheargument.
*/
voidsetDefaultValue(Tconst&newDefault){
STORM_LOG_THROW(this->validate(newDefault),storm::exceptions::IllegalArgumentValueException,"The default value for the argument did not pass all validation functions.");
STORM_LOG_THROW(this->hasDefaultValue,storm::exceptions::IllegalFunctionCallException,"Unable to make argument '"<<this->name<<"' optional without default value.");
STORM_LOG_THROW(this->type==ArgumentType::funcName,storm::exceptions::IllegalFunctionCallException,"Illegal default value for argument"<<this->name<<", because it is of different type.");\
STORM_LOG_THROW(!this->hasBeenBuilt,storm::exceptions::IllegalFunctionCallException,"Cannot rebuild argument with builder that was already used to build an argument.");
STORM_LOG_THROW(this->getArgumentCount()==other.getArgumentCount(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their argument count differs.");
STORM_LOG_THROW(firstArgument.getType()==secondArgument.getType(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their arguments are incompatible.");
STORM_LOG_THROW(argumentIterator!=this->argumentNameMap.end(),storm::exceptions::IllegalArgumentException,"Unable to retrieve argument with unknown name '"<<argumentName<<"'.");
STORM_LOG_THROW(!longNameContainsNonAlpha,storm::exceptions::IllegalArgumentException,"Unable to construct option with illegal long name '"<<longName<<"'.");
STORM_LOG_THROW(!shortNameContainsNonAlpha,storm::exceptions::IllegalArgumentException,"Unable to construct option with illegal short name '"<<shortName<<"'.");
STORM_LOG_THROW(this->getArgumentCount()==other.getArgumentCount(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their argument count differs.");
STORM_LOG_THROW(firstArgument.getType()==secondArgument.getType(),storm::exceptions::OptionUnificationException,"Unable to unify two options, because their arguments are incompatible.");
STORM_LOG_THROW(argumentIterator!=this->argumentNameMap.end(),storm::exceptions::IllegalArgumentException,"Unable to retrieve argument with unknown name '"<<argumentName<<"'.");
STORM_LOG_THROW(!longNameContainsNonAlpha,storm::exceptions::IllegalArgumentException,"Unable to construct option with illegal long name '"<<longName<<"'.");
STORM_LOG_THROW(!shortNameContainsNonAlpha,storm::exceptions::IllegalArgumentException,"Unable to construct option with illegal short name '"<<shortName<<"'.");