本文整理汇总了C++中ModelData::getRelatedFuncParamClasses方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelData::getRelatedFuncParamClasses方法的具体用法?C++ ModelData::getRelatedFuncParamClasses怎么用?C++ ModelData::getRelatedFuncParamClasses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelData
的用法示例。
在下文中一共展示了ModelData::getRelatedFuncParamClasses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateConnections
void ClassGraph::updateConnections(const ModelData &modelData)
{
mConnectMap.clear();
// Diagram *node1, Diagram *node2
for(size_t ni=0; ni<mNodes.size(); ni++)
{
const ModelType *type = mNodes[ni].getType();
if(type)
{
if(mGraphOptions.drawTemplateRelations)
{
// Go through templates
if(type->isTemplateUseType())
{
ConstModelClassifierVector relatedClassifiers;
modelData.getRelatedTypeArgClasses(*type, relatedClassifiers);
for(auto const &cl : relatedClassifiers)
{
insertConnection(ni, cl, ClassConnectItem(ctTemplateDependency));
}
}
}
const ModelClassifier *classifier = type->getClass();
if(classifier)
{
// Get attributes of classifier, and get the decl type
for(const auto &attr : classifier->getAttributes())
{
insertConnection(ni, attr->getDeclType(),
ClassConnectItem(ctAggregation, attr->isConst(),
attr->isRefer(), attr->getAccess()));
}
if(mGraphOptions.drawOperParamRelations)
{
// Get operations parameters of classifier, and get the decl type
ConstModelDeclClasses declClasses;
modelData.getRelatedFuncParamClasses(*classifier, declClasses);
for(const auto &declCl : declClasses)
{
const ModelDeclarator *decl = declCl.getDecl();
insertConnection(ni, declCl.getClass(), ClassConnectItem(ctFuncParam,
decl->isConst(), decl->isRefer(), Visibility()));
}
}
if(mGraphOptions.drawOperBodyVarRelations)
{
// Get operations parameters of classifier, and get the decl type
ConstModelDeclClasses declClasses;
modelData.getRelatedBodyVarClasses(*classifier, declClasses);
for(const auto &declCl : declClasses)
{
const ModelDeclarator *decl = declCl.getDecl();
insertConnection(ni, declCl.getClass(), ClassConnectItem(ctFuncVar,
decl->isConst(), decl->isRefer(), Visibility()));
}
}
// Go through associations, and get related classes.
for(const auto &assoc : modelData.mAssociations)
{
size_t n1Index = NO_INDEX;
size_t n2Index = NO_INDEX;
if(assoc->getChild() == classifier)
{
n1Index = getNodeIndex(assoc->getParent());
n2Index = ni;
}
else if(assoc->getParent() == classifier)
{
n1Index = ni;
n2Index = getNodeIndex(assoc->getChild());
}
if(n1Index != NO_INDEX && n2Index != NO_INDEX)
{
insertConnection(n1Index, n2Index,
ClassConnectItem(ctIneritance, assoc->getAccess()));
}
}
}
}
}
}