本文整理汇总了C++中qrrepo::RepoApi::to方法的典型用法代码示例。如果您正苦于以下问题:C++ RepoApi::to方法的具体用法?C++ RepoApi::to怎么用?C++ RepoApi::to使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qrrepo::RepoApi
的用法示例。
在下文中一共展示了RepoApi::to方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseContainer
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: parseExplosion
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: parseGeneralization
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");
}