コード例 #1
0
void QrsMetamodelLoader::parseContainer(const qrRepo::RepoApi &repo, Metamodel &metamodel
		, const Id &id, const QString &diagram)
{
	const Id from = repo.from(id);
	const Id to = repo.to(id);
	if (from.isNull() || to.isNull()) {
		qWarning() << "Containment link" << id << "is not connected!";
		return;
	}

	const QString fromName = validateName(repo, from);
	const QString toName = validateName(repo, to);
	ElementType &fromElement = metamodel.elementType(diagram, fromName);
	ElementType &toElement = metamodel.elementType(diagram, toName);
	metamodel.produceEdge(fromElement, toElement, ElementType::containmentLinkType);
}
コード例 #2
0
void QrsMetamodelLoader::parseExplosion(const qrRepo::RepoApi &repo, Metamodel &metamodel
		, const Id &id, const QString &diagram)
{
	const Id from = repo.from(id);
	const Id to = repo.to(id);
	if (from.isNull() || to.isNull()) {
		qWarning() << "Explosion" << id << "is not connected!";
		return;
	}

	const QString fromName = validateName(repo, from);
	const QString toName = validateName(repo, to);
	ElementType &fromElement = metamodel.elementType(diagram, fromName);
	ElementType &toElement = metamodel.elementType(diagram, toName);
	metamodel.addExplosion(fromElement, toElement, boolProperty(repo, id, "makeReusable")
			, boolProperty(repo, id, "requireImmediateLinkage"));
}
コード例 #3
0
void QrsMetamodelLoader::parseGeneralization(const qrRepo::RepoApi &repo, Metamodel &metamodel, const Id &id
		, const QString &diagram, ElementType *&fromElement, ElementType *&toElement, QString &overridingProperties)
{
	const Id from = repo.from(id);
	const Id to = repo.to(id);
	if (from.isNull() || to.isNull()) {
		qWarning() << "Generalization" << id << "is not connected!";
		return;
	}

	const QString fromName = validateName(repo, from);
	const QString toName = validateName(repo, to);
	fromElement = &metamodel.elementType(diagram, fromName);
	toElement = &metamodel.elementType(diagram, toName);
	metamodel.produceEdge(*toElement, *fromElement, ElementType::generalizationLinkType);

	overridingProperties = stringProperty(repo, id, "overrides");
}