const ConfigurationScope *
SimulationConfiguration::Implementation::getObjectQueueScope() const {
	const ConfigurationScope *retval = 0;
	string simType = stringToUpper(getSimulationType());
	const ConfigurationScope *twScope = getTimeWarpScope();
	if (twScope != 0) {
		retval = twScope->findScope(getObjectQueueScopeName());
	}
	return retval;
}
const ConfigurationScope *
SimulationConfiguration::Implementation::getEventListScope() const {
	const ConfigurationScope *retval = 0;
	string simType = stringToUpper(getSimulationType());
	if (simType == "SEQUENTIAL") {
		retval = findScope(getEventListScopeName());
	} else if (simType == "TIMEWARP" || simType
			== "THREADEDTIMEWARP") {
		const ConfigurationScope *twScope = getTimeWarpScope();
		if (twScope != 0) {
			retval = twScope->findScope(getEventListScopeName());
		}
	}

	return retval;
}
Esempio n. 3
0
int Results::getSimulationParameter()
{
    Settings::simulationType type = getSimulationType();
    int result;
    if(type == Settings::stepsByStep)
    {
        result = simulationOptionsSpinBoxes[0]->value();
        if(result < MIN_STEPS_VALUE || result > MAX_STEPS_VALUE)
            throw "steps value out of range";
    }
    else
    {
        result = simulationOptionsSpinBoxes[1]->value();
        if(result < MIN_STEPS_PER_SECOND || result > MAX_STEPS_PER_SECOND)
            throw "steps value out of range";
    }
    return result;

}
bool SimulationConfiguration::Implementation::simulationTypeIs(
		const string &testValue) const {
	return (stringToUpper(testValue) == stringToUpper(getSimulationType()));
}