Пример #1
0
    /**
     * @brief SignatureMaker::makeType
     * @param type
     * @return
     */
    QString SignatureMaker::makeType(const Entity::SharedType &type) const
    {
        if (!type)
            return "";

        QString result;

        QStringList scopes;
        auto scopeId = type->scopeId();
        QSet<Common::ID> forbidden = {Common::ID::projectScopeID(),
                                            Common::ID::globalScopeID(),
                                            Common::ID::localTemplateScopeID()};
        while (!globalIds.contains(scopeId)) {
            if (auto scope = findScope(scopeId)) {
                if (!scope->name().isEmpty() && !forbidden.contains(scopeId))
                    scopes.prepend(scope->name());
                scopeId = scope->scopeId();
            } else {
                return "";
            }
        }

        scopes.removeAll("");
        if (!scopes.isEmpty())
            result.prepend(scopes.join("::").append("::"));

        result.append(type->name());

        return result;
    }
Пример #2
0
bool SimulationConfiguration::Implementation::spinKeySet(
		const string &testValue) const {
	bool retval = false;
	const ConfigurationScope *debugScope = findScope("ParallelDebug");
	if (debugScope != 0) {
		const ConfigurationChoice *choice = debugScope->findChoice(testValue);
		if (choice != 0) {
			retval = stringToUpper(choice->getStringValue()) == "TRUE";
		}
	}
	return retval;
}
Пример #3
0
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;
}
Пример #4
0
/// Analyze lexical lookup instructions HR_findprop and HR_findpropstrict.
///
Def* IdentityAnalyzer::doFindStmt(NaryStmt3* instr) {
  int index;
  if (findScope(lattice_, instr, &index) == kScopeLocal)
    return identity(instr, def(instr->vararg(index)));
  return def_;
}
Пример #5
0
const ConfigurationScope *
SimulationConfiguration::Implementation::getTimeWarpScope() const {
	return findScope(getTimeWarpScopeName());
}