示例#1
0
        // ---------- Edge setter function(s) ----------

        /// <summary>
        /// Sets the friend edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the friend edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setFriend(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Friendship.setFriend(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMethod) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkClass))
                {
                    if (m_friend != 0)
                    {
                    }
                    m_friend = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Friendship.setFriend(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_friend != 0)
                {
                }
                m_friend = 0;
            }
        }
示例#2
0
        /// <summary>
        /// Sets the hasReturnType edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the hasReturnType edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setHasReturnType(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerMethod.setHasReturnType(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkType))
                {
                    if (m_hasReturnType != 0)
                    {
                    }
                    m_hasReturnType = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerMethod.setHasReturnType(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_hasReturnType != 0)
                {
                }
                m_hasReturnType = 0;
            }
        }
        public ListIterator <Columbus.Lim.Asg.Nodes.Base.Base> constIteratorEnd(uint id, Types.EdgeKind edge)
        {
            if (reContainer.Count <= id || reContainer[(int)id] == null)
            {
                StackTrace st = new StackTrace(new StackFrame(true));
                StackFrame sf = st.GetFrame(0);
                throw new LimException(sf.GetFileName() + " : " + sf.GetFileLineNumber(), "Invalid NodeId(" + fact.getRef(id) + ")");
            }
            LinkedList <uint> it = null;

            if (reContainer[(int)id].TryGetValue(edge, out it))
            {
                return(new ListIterator <Columbus.Lim.Asg.Nodes.Base.Base>(it, fact, false));
            }
            else
            {
                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(id);
                if (PossibleEdges[(int)node.NodeKind, (int)edge])
                {
                    // creating an empty container and returning with it
                    LinkedList <uint> nodeList = new LinkedList <uint>();
                    reContainer[(int)id].Add(edge, nodeList);
                    return(new ListIterator <Columbus.Lim.Asg.Nodes.Base.Base>(nodeList, fact, false));
                }
                else
                {
                    StackTrace st = new StackTrace(new StackFrame(true));
                    StackFrame sf = st.GetFrame(0);
                    throw new LimException(sf.GetFileName() + " : " + sf.GetFileLineNumber(), "Invalid edge kind");
                }
            }
        }
示例#4
0
        /// <summary>
        /// Adds a new dependsOn edge to the node.
        /// </summary>
        /// <param name="nodeId">[in] The end point of the new dependsOn edge.</param>
        /// <param name="acValue">[in] The value of the association class.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
        public void addDependsOn(uint nodeId, string acValue)
        {
            if (!fact.getExist(nodeId))
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Base.Named.addDependsOn(NodeId)", "The end point of the edge does not exist.");
            }
            Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
            if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkNamed))
            {
                ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Base.Named> .AssocEdge ac = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Base.Named> .AssocEdge();

                ac.assocClass = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Base.Named> .AssocClass();

                ac.id = nodeId;
                ac.assocClass.acString = Convert.ToString(fact.StringTable.set(acValue));

                dependsOnAssocContainer.AddLast(ac);
            }
            else
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Base.Named.setDependsOn(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
            }
            if (fact.ReverseEdges != null)
            {
                fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkNamed_DependsOn);
            }
        }
示例#5
0
        /// <summary>
        /// Adds a new hasArguments edge to the node.
        /// </summary>
        /// <param name="nodeId">[in] The end point of the new hasArguments edge.</param>
        /// <param name="acValue">[in] The value of the association class.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
        public void addHasArguments(uint nodeId, Types.TypeArgumentConstraintKind acValue)
        {
            if (!fact.getExist(nodeId))
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Logical.MethodGenericSpec.addHasArguments(NodeId)", "The end point of the edge does not exist.");
            }
            Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
            if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkType))
            {
                ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Type.Type> .AssocEdge ac = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Type.Type> .AssocEdge();

                ac.assocClass = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Type.Type> .AssocClass();

                ac.id = nodeId;
                ac.assocClass.acTypeArgumentConstraintKind = acValue;

                hasArgumentsAssocContainer.AddLast(ac);
            }
            else
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Logical.MethodGenericSpec.setHasArguments(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
            }
            if (fact.ReverseEdges != null)
            {
                fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkMethodGenericSpec_HasArguments);
            }
        }
示例#6
0
        // ---------- Edge setter function(s) ----------

        /// <summary>
        /// Sets the refersTo edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the refersTo edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setRefersTo(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerType.setRefersTo(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkSimpleType) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkGenericParameter) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMethodGenericInstance) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkClass))
                {
                    if (m_refersTo != 0)
                    {
                    }
                    m_refersTo = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerType.setRefersTo(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_refersTo != 0)
                {
                }
                m_refersTo = 0;
            }
        }
        // ---------- Edge setter function(s) ----------

        /// <summary>
        /// Sets the attribute edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the attribute edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setAttribute(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.AttributeAccess.setAttribute(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkAttribute))
                {
                    if (m_attribute != 0)
                    {
                    }
                    m_attribute = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.AttributeAccess.setAttribute(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_attribute != 0)
                {
                }
                m_attribute = 0;
            }
        }
示例#8
0
        /// <summary>
        /// Adds a new isContainedIn edge to the node.
        /// </summary>
        /// <param name="nodeId">[in] The end point of the new isContainedIn edge.</param>
        /// <param name="acValue">[in] The value of the association class.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
        public void addIsContainedIn(uint nodeId, SourcePosition acValue)
        {
            if (!fact.getExist(nodeId))
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.addIsContainedIn(NodeId)", "The end point of the edge does not exist.");
            }
            Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
            if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkFile))
            {
                ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Physical.File> .AssocEdge ac = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Physical.File> .AssocEdge();

                ac.assocClass = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Physical.File> .AssocClass();

                ac.id = nodeId;
                ac.assocClass.acSourcePosition = acValue;

                isContainedInAssocContainer.AddLast(ac);
            }
            else
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.setIsContainedIn(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
            }
            if (fact.ReverseEdges != null)
            {
                fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkMember_IsContainedIn);
            }
        }
示例#9
0
        /// <summary>
        /// Sets the specialize edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the specialize edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setSpecialize(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.MethodGenericSpec.setSpecialize(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMethodGeneric))
                {
                    if (m_specialize != 0)
                    {
                    }
                    m_specialize = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.MethodGenericSpec.setSpecialize(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_specialize != 0)
                {
                }
                m_specialize = 0;
            }
        }
示例#10
0
 /// <summary>
 /// Decides whether the node is compiste or not.
 /// </summary>
 /// <param name="node">[in] The node which is being examined.</param>
 /// <returns>Returns true if the node is not composite.</returns>
 public static bool getIsNotComposite(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     Types.NodeKind ndk = node.NodeKind;
     return
         (ndk == Types.NodeKind.ndkBase ||
          ndk == Types.NodeKind.ndkComment ||
          ndk == Types.NodeKind.ndkControlFlowBlock ||
          ndk == Types.NodeKind.ndkNamed ||
          ndk == Types.NodeKind.ndkComponent ||
          ndk == Types.NodeKind.ndkGenericParameter ||
          ndk == Types.NodeKind.ndkMember ||
          ndk == Types.NodeKind.ndkAttribute ||
          ndk == Types.NodeKind.ndkScope ||
          ndk == Types.NodeKind.ndkClass ||
          ndk == Types.NodeKind.ndkClassGenericInstance ||
          ndk == Types.NodeKind.ndkPackage ||
          ndk == Types.NodeKind.ndkParameter ||
          ndk == Types.NodeKind.ndkFSEntry ||
          ndk == Types.NodeKind.ndkFile ||
          ndk == Types.NodeKind.ndkAttributeAccess ||
          ndk == Types.NodeKind.ndkFriendship ||
          ndk == Types.NodeKind.ndkMethodCall ||
          ndk == Types.NodeKind.ndkSimpleType ||
          ndk == Types.NodeKind.ndkType ||
          ndk == Types.NodeKind.ndkTypeFormer ||
          ndk == Types.NodeKind.ndkTypeFormerArray ||
          ndk == Types.NodeKind.ndkTypeFormerMethod ||
          ndk == Types.NodeKind.ndkTypeFormerNonType ||
          ndk == Types.NodeKind.ndkTypeFormerPointer ||
          ndk == Types.NodeKind.ndkTypeFormerType);
 }
示例#11
0
        /// <summary>
        /// Sets the languageVariant edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the languageVariant edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the nodeId is invalid.</exception>
        public void setLanguageVariant(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.setLanguageVariant(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMember))
                {
                    if (m_languageVariant != 0)
                    {
                    }
                    m_languageVariant = nodeId;
                }
                else
                {
                    throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.setLanguageVariant(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_languageVariant != 0)
                {
                }
                m_languageVariant = 0;
            }
        }
        public void insertEdge(Columbus.Lim.Asg.Nodes.Base.Base from, Columbus.Lim.Asg.Nodes.Base.Base to, Types.EdgeKind edge)
        {
            try {
                if (selectorFunc != null)
                {
                    if (!selectorFunc(from))
                    {
                        return;
                    }
                }

                insertNode(from.Id);
            }
            catch (LimException) {
                StackTrace st = new StackTrace(new StackFrame(true));
                StackFrame sf = st.GetFrame(0);
                throw new LimException(sf.GetFileName() + " : " + sf.GetFileLineNumber(), "Invalid NodeId (" + fact.getRef(from.Id) + ")");
            }

            LinkedList <uint> it = null;

            if (reContainer[(int)from.Id].TryGetValue(edge, out it))
            {
                it.AddLast(to.Id);
            }
            else
            {
                LinkedList <uint> nodeList = new LinkedList <uint>();
                nodeList.AddLast(to.Id);
                reContainer[(int)from.Id].Add(edge, nodeList);
            }
        }
示例#13
0
        public override void visit(Columbus.Lim.Asg.Nodes.Base.Base node, bool callVirtualBase)
        {
            uint id = node.Id;

            if (revEdges.reContainer[(int)id] == null)
            {
                revEdges.reContainer[(int)id] = new Dictionary <Types.EdgeKind, LinkedList <uint> >();
            }
        }
示例#14
0
 /// <summary>
 /// Sets the refersTo edge.
 /// </summary>
 /// <param name="node">[in] The new end point of the refersTo edge.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if there's something wrong with the given node.</exception>
 public void setRefersTo(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkSimpleType) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkGenericParameter) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMethodGenericInstance) || Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkClass))
     {
         if (m_refersTo != 0)
         {
         }
         m_refersTo = node.Id;
     }
     else
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerType.setRefersTo(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
 }
示例#15
0
 public static bool getIsAPSpecNode(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     Types.NodeKind ndk = node.NodeKind;
     return
         (ndk == Types.NodeKind.ndkComment ||
          ndk == Types.NodeKind.ndkComponent ||
          ndk == Types.NodeKind.ndkAttributeAccess ||
          ndk == Types.NodeKind.ndkFriendship ||
          ndk == Types.NodeKind.ndkMethodCall ||
          ndk == Types.NodeKind.ndkFileSystem ||
          ndk == Types.NodeKind.ndkSimpleType ||
          ndk == Types.NodeKind.ndkType ||
          ndk == Types.NodeKind.ndkTypeFormerArray ||
          ndk == Types.NodeKind.ndkTypeFormerMethod ||
          ndk == Types.NodeKind.ndkTypeFormerNonType ||
          ndk == Types.NodeKind.ndkTypeFormerPointer ||
          ndk == Types.NodeKind.ndkTypeFormerType);
 }
示例#16
0
 /// <summary>
 /// Adds a new pred edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new pred edge.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
 public void addPred(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Base.ControlFlowBlock.addPred(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkControlFlowBlock))
     {
         predContainer.AddLast(nodeId);
     }
     else
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Base.ControlFlowBlock.setPred(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkControlFlowBlock_Pred);
     }
 }
示例#17
0
 /// <summary>
 /// Adds a new hasComment edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new hasComment edge.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
 public void addHasComment(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Physical.File.addHasComment(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkComment))
     {
         hasCommentContainer.AddLast(nodeId);
     }
     else
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Physical.File.setHasComment(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkFile_HasComment);
     }
 }
示例#18
0
 /// <summary>
 /// Adds a new uses edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new uses edge.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
 public void addUses(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.addUses(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkType))
     {
         usesContainer.AddLast(nodeId);
     }
     else
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Logical.Member.setUses(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkMember_Uses);
     }
 }
示例#19
0
 /// <summary>
 /// Adds a new hasGenericParameter edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new hasGenericParameter edge.</param>
 /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if the given nodeId is invalid.</exception>
 public void addHasGenericParameter(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Logical.ClassGeneric.addHasGenericParameter(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkGenericParameter))
     {
         hasGenericParameterContainer.AddLast(nodeId);
     }
     else
     {
         throw new LimException("Columbus.Lim.Asg.Nodes.Logical.ClassGeneric.setHasGenericParameter(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     setParentEdge(nodeId, (uint)Types.EdgeKind.edkClassGeneric_HasGenericParameter);
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkClassGeneric_HasGenericParameter);
     }
 }
        public void removeNode(uint id)
        {
            // TODO
            Dictionary <Types.EdgeKind, LinkedList <uint> > pEdges = reContainer[(int)id];

            if (pEdges == null)
            {
                StackTrace st = new StackTrace(new StackFrame(true));
                StackFrame sf = st.GetFrame(0);
                throw new LimException(sf.GetFileName() + " : " + sf.GetFileLineNumber(), "");
            }
            Columbus.Lim.Asg.Nodes.Base.Base node = fact.getRef(id);
            foreach (var pEdge in pEdges)
            {
                while (pEdge.Value.First != pEdge.Value.Last)
                {
                    //fact.getRef(pEdge.Value.First.Value).removeEdge(pEdge.Key, node);
                }
            }
            var edges = reContainer[(int)id];

            edges = null;
        }
示例#21
0
 /// <summary>
 /// Decides whether the node is type::TypeFormerType or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is type::TypeFormerType.</returns>
 public static bool getIsTypeFormerType(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Type.TypeFormerType);
 }
示例#22
0
 /// <summary>
 /// Decides whether the node is compiste or not.
 /// </summary>
 /// <param name="node">[in] The node which is being examined.</param>
 /// <returns>Returns true if the node is composite.</returns>
 public static bool getIsComposite(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(!getIsNotComposite(node));
 }
示例#23
0
 /// <summary>
 /// Decides whether the node is base::ControlFlowBlock or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is base::ControlFlowBlock.</returns>
 public static bool getIsControlFlowBlock(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Base.ControlFlowBlock);
 }
示例#24
0
 public virtual void visitEnd(Columbus.Lim.Asg.Nodes.Base.Base node, bool callVirtualBase)
 {
 }
示例#25
0
 /// <summary>
 /// Decides whether the node is base::Named or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is base::Named.</returns>
 public static bool getIsNamed(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Base.Named);
 }
示例#26
0
 /// <summary>
 /// Decides whether the node is logical::AttributeAccess or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is logical::AttributeAccess.</returns>
 public static bool getIsAttributeAccess(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Logical.AttributeAccess);
 }
示例#27
0
 /// <summary>
 /// Decides whether the node is logical::Class or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is logical::Class.</returns>
 public static bool getIsClass(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Logical.Class);
 }
示例#28
0
 /// <summary>
 /// Visitor for saving node.
 /// </summary>
 /// <param name="node">[in] This node is being saved.</param>
 /// <exception cref="Columbus.ColumbusIOException">Throws ColumbusIOException if there's something wrong with the file.</exception>
 public override void visitEnd(Columbus.Lim.Asg.Nodes.Base.Base node, bool callVirtualBase)
 {
     node.save(io);
 }
示例#29
0
 /// <summary>
 /// Decides whether the node is base::Component or not.
 /// </summary>
 /// <param name="node">[in] The node whose kind is examined.</param>
 /// <returns>Returns true if the node is base::Component.</returns>
 public static bool getIsComponent(Columbus.Lim.Asg.Nodes.Base.Base node)
 {
     return(node is Columbus.Lim.Asg.Nodes.Base.Component);
 }
 /// <summary>
 /// Visitor for all nodes.
 /// </summary>
 /// <param name="node">[in] This node is being visited.</param>
 public override void visit(Columbus.Lim.Asg.Nodes.Base.Base node, bool callVirtualBase)
 {
     nodeList.Add(node.Id);
 }