Example #1
0
void ClassGraph::addNode(const ModelData &model, char const * const className,
        ClassGraph::eAddNodeTypes addType, int nodeDepth, bool reposition)
    {
    const ModelType *type = model.getTypeRef(className);
    const ModelClassifier *classifier = type->getClass();
    if(classifier)
        {
        if(mNodes.size() == 0 && mGraphOptions.drawRelationKey)
            {
            addRelationKeyNode();
            }
        size_t startSize = mNodes.size();
        getRelatedNodesRecurse(model, classifier, addType, nodeDepth, mNodes);
        if(startSize != mNodes.size())
            {
            mModified = true;
            }
        updateGraph(model, reposition);
        }
    }
Example #2
0
void Contexts::updateOperationList(const ModelData &modelData,
        OovStringRef const className)
    {
    mOperationList.clear();
    const ModelClassifier *cls = modelData.getTypeRef(className)->getClass();
    if(cls)
        {
        for(size_t i=0; i<cls->getOperations().size(); i++)
            {
            const ModelOperation *oper = cls->getOperations()[i].get();
            std::string opStr = oper->getName();
            if(oper->isConst())
                {
                opStr += ' ';
                opStr += "const";
                }
            mOperationList.appendText(opStr);
            }
        mOperationList.sort();
        }
    }