示例#1
0
        /// <summary>
        /// Sets the Else edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the Else edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setElse(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Statement.IfStatementSyntax.setElse(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkElseClauseSyntax))
                {
                    if (m_Else != 0)
                    {
                        removeParentEdge(m_Else);
                    }
                    m_Else = nodeId;
                    setParentEdge(m_Else, (uint)Types.EdgeKind.edkIfStatementSyntax_Else);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Statement.IfStatementSyntax.setElse(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Else != 0)
                {
                    removeParentEdge(m_Else);
                }
                m_Else = 0;
            }
        }
        /// <summary>
        /// Sets the WhenNotNull edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the WhenNotNull edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setWhenNotNull(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ConditionalAccessExpressionSyntax.setWhenNotNull(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkExpressionSyntax))
                {
                    if (m_WhenNotNull != 0)
                    {
                        removeParentEdge(m_WhenNotNull);
                    }
                    m_WhenNotNull = nodeId;
                    setParentEdge(m_WhenNotNull, (uint)Types.EdgeKind.edkConditionalAccessExpressionSyntax_WhenNotNull);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ConditionalAccessExpressionSyntax.setWhenNotNull(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_WhenNotNull != 0)
                {
                    removeParentEdge(m_WhenNotNull);
                }
                m_WhenNotNull = 0;
            }
        }
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkArrowExpressionClauseSyntax))
                {
                    if (m_ExpressionBody != 0)
                    {
                        removeParentEdge(m_ExpressionBody);
                    }
                    m_ExpressionBody = nodeId;
                    setParentEdge(m_ExpressionBody, (uint)Types.EdgeKind.edkIndexerDeclarationSyntax_ExpressionBody);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.IndexerDeclarationSyntax.setExpressionBody(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_ExpressionBody != 0)
                {
                    removeParentEdge(m_ExpressionBody);
                }
                m_ExpressionBody = 0;
            }
        }
示例#4
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkParameterListSyntax))
                {
                    if (m_ParameterList != 0)
                    {
                        removeParentEdge(m_ParameterList);
                    }
                    m_ParameterList = nodeId;
                    setParentEdge(m_ParameterList, (uint)Types.EdgeKind.edkParenthesizedLambdaExpressionSyntax_ParameterList);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ParenthesizedLambdaExpressionSyntax.setParameterList(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_ParameterList != 0)
                {
                    removeParentEdge(m_ParameterList);
                }
                m_ParameterList = 0;
            }
        }
示例#5
0
        /// <summary>
        /// Sets the ConstructorCall edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the ConstructorCall edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setConstructorCall(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ObjectCreationExpressionSyntax.setConstructorCall(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkConstructorDeclarationSyntax))
                {
                    if (m_ConstructorCall != 0)
                    {
                    }
                    m_ConstructorCall = nodeId;
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ObjectCreationExpressionSyntax.setConstructorCall(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_ConstructorCall != 0)
                {
                }
                m_ConstructorCall = 0;
            }
        }
        /// <summary>
        /// Sets the SelectOrGroup edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the SelectOrGroup edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setSelectOrGroup(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.QueryBodySyntax.setSelectOrGroup(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkSelectOrGroupClauseSyntax))
                {
                    if (m_SelectOrGroup != 0)
                    {
                        removeParentEdge(m_SelectOrGroup);
                    }
                    m_SelectOrGroup = nodeId;
                    setParentEdge(m_SelectOrGroup, (uint)Types.EdgeKind.edkQueryBodySyntax_SelectOrGroup);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.QueryBodySyntax.setSelectOrGroup(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_SelectOrGroup != 0)
                {
                    removeParentEdge(m_SelectOrGroup);
                }
                m_SelectOrGroup = 0;
            }
        }
示例#7
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkNameEqualsSyntax))
                {
                    if (m_Alias != 0)
                    {
                        removeParentEdge(m_Alias);
                    }
                    m_Alias = nodeId;
                    setParentEdge(m_Alias, (uint)Types.EdgeKind.edkUsingDirectiveSyntax_Alias);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.UsingDirectiveSyntax.setAlias(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Alias != 0)
                {
                    removeParentEdge(m_Alias);
                }
                m_Alias = 0;
            }
        }
示例#8
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkVariableDeclarationSyntax))
                {
                    if (m_Declaration != 0)
                    {
                        removeParentEdge(m_Declaration);
                    }
                    m_Declaration = nodeId;
                    setParentEdge(m_Declaration, (uint)Types.EdgeKind.edkLocalDeclarationStatementSyntax_Declaration);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Statement.LocalDeclarationStatementSyntax.setDeclaration(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Declaration != 0)
                {
                    removeParentEdge(m_Declaration);
                }
                m_Declaration = 0;
            }
        }
示例#9
0
        /// <summary>
        /// Sets the Name edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the Name edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setName(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.TypeParameterConstraintClauseSyntax.setName(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkIdentifierNameSyntax))
                {
                    if (m_Name != 0)
                    {
                        removeParentEdge(m_Name);
                    }
                    m_Name = nodeId;
                    setParentEdge(m_Name, (uint)Types.EdgeKind.edkTypeParameterConstraintClauseSyntax_Name);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.TypeParameterConstraintClauseSyntax.setName(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Name != 0)
                {
                    removeParentEdge(m_Name);
                }
                m_Name = 0;
            }
        }
示例#10
0
        /// <summary>
        /// Sets the Member edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the Member edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setMember(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.QualifiedCrefSyntax.setMember(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMemberCrefSyntax))
                {
                    if (m_Member != 0)
                    {
                        removeParentEdge(m_Member);
                    }
                    m_Member = nodeId;
                    setParentEdge(m_Member, (uint)Types.EdgeKind.edkQualifiedCrefSyntax_Member);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.QualifiedCrefSyntax.setMember(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Member != 0)
                {
                    removeParentEdge(m_Member);
                }
                m_Member = 0;
            }
        }
示例#11
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkBlockSyntax))
                {
                    if (m_Block != 0)
                    {
                        removeParentEdge(m_Block);
                    }
                    m_Block = nodeId;
                    setParentEdge(m_Block, (uint)Types.EdgeKind.edkCatchClauseSyntax_Block);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.CatchClauseSyntax.setBlock(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Block != 0)
                {
                    removeParentEdge(m_Block);
                }
                m_Block = 0;
            }
        }
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkPositioned))
                {
                    if (m_Body != 0)
                    {
                        removeParentEdge(m_Body);
                    }
                    m_Body = nodeId;
                    setParentEdge(m_Body, (uint)Types.EdgeKind.edkAnonymousFunctionExpressionSyntax_Body);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.AnonymousFunctionExpressionSyntax.setBody(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Body != 0)
                {
                    removeParentEdge(m_Body);
                }
                m_Body = 0;
            }
        }
示例#13
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkAttributeArgumentListSyntax))
                {
                    if (m_ArgumentList != 0)
                    {
                        removeParentEdge(m_ArgumentList);
                    }
                    m_ArgumentList = nodeId;
                    setParentEdge(m_ArgumentList, (uint)Types.EdgeKind.edkAttributeSyntax_ArgumentList);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.AttributeSyntax.setArgumentList(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_ArgumentList != 0)
                {
                    removeParentEdge(m_ArgumentList);
                }
                m_ArgumentList = 0;
            }
        }
示例#14
0
        /// <summary>
        /// Sets the Initializer edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the Initializer edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setInitializer(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.PropertyDeclarationSyntax.setInitializer(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkEqualsValueClauseSyntax))
                {
                    if (m_Initializer != 0)
                    {
                        removeParentEdge(m_Initializer);
                    }
                    m_Initializer = nodeId;
                    setParentEdge(m_Initializer, (uint)Types.EdgeKind.edkPropertyDeclarationSyntax_Initializer);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.PropertyDeclarationSyntax.setInitializer(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Initializer != 0)
                {
                    removeParentEdge(m_Initializer);
                }
                m_Initializer = 0;
            }
        }
示例#15
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkExpressionSyntax))
                {
                    if (m_Condition != 0)
                    {
                        removeParentEdge(m_Condition);
                    }
                    m_Condition = nodeId;
                    setParentEdge(m_Condition, (uint)Types.EdgeKind.edkWhereClauseSyntax_Condition);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.WhereClauseSyntax.setCondition(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Condition != 0)
                {
                    removeParentEdge(m_Condition);
                }
                m_Condition = 0;
            }
        }
示例#16
0
        /// <summary>
        /// Sets the StartTag edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the StartTag edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setStartTag(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.XmlElementSyntax.setStartTag(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkXmlElementStartTagSyntax))
                {
                    if (m_StartTag != 0)
                    {
                        removeParentEdge(m_StartTag);
                    }
                    m_StartTag = nodeId;
                    setParentEdge(m_StartTag, (uint)Types.EdgeKind.edkXmlElementSyntax_StartTag);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.XmlElementSyntax.setStartTag(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_StartTag != 0)
                {
                    removeParentEdge(m_StartTag);
                }
                m_StartTag = 0;
            }
        }
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkCrefBracketedParameterListSyntax))
                {
                    if (m_Parameters != 0)
                    {
                        removeParentEdge(m_Parameters);
                    }
                    m_Parameters = nodeId;
                    setParentEdge(m_Parameters, (uint)Types.EdgeKind.edkIndexerMemberCrefSyntax_Parameters);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.IndexerMemberCrefSyntax.setParameters(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Parameters != 0)
                {
                    removeParentEdge(m_Parameters);
                }
                m_Parameters = 0;
            }
        }
示例#18
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkMemberDeclarationSyntax))
                {
                    if (m_OriginalDefinition != 0)
                    {
                    }
                    m_OriginalDefinition = nodeId;
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.TypeSyntax.setOriginalDefinition(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_OriginalDefinition != 0)
                {
                }
                m_OriginalDefinition = 0;
            }
        }
示例#19
0
        /// <summary>
        /// Sets the Type edge.
        /// </summary>
        /// <param name="nodeId">[in] The new end point of the Type edge or 0. With 0 the edge can be deleted.</param>
        /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the nodeId is invalid.</exception>
        public void setType(uint nodeId)
        {
            if (nodeId != 0)
            {
                if (!fact.getExist(nodeId))
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.ConversionOperatorDeclarationSyntax.setType(NodeId)", "The end point of the edge does not exist.");
                }

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkTypeSyntax))
                {
                    if (m_Type != 0)
                    {
                        removeParentEdge(m_Type);
                    }
                    m_Type = nodeId;
                    setParentEdge(m_Type, (uint)Types.EdgeKind.edkConversionOperatorDeclarationSyntax_Type);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.ConversionOperatorDeclarationSyntax.setType(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Type != 0)
                {
                    removeParentEdge(m_Type);
                }
                m_Type = 0;
            }
        }
示例#20
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkExpressionSyntax))
                {
                    if (m_Operand != 0)
                    {
                        removeParentEdge(m_Operand);
                    }
                    m_Operand = nodeId;
                    setParentEdge(m_Operand, (uint)Types.EdgeKind.edkPostfixUnaryExpressionSyntax_Operand);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.PostfixUnaryExpressionSyntax.setOperand(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Operand != 0)
                {
                    removeParentEdge(m_Operand);
                }
                m_Operand = 0;
            }
        }
示例#21
0
        // ---------- Edge setter function(s) ----------

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

                Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
                if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkSimpleNameSyntax))
                {
                    if (m_Name != 0)
                    {
                        removeParentEdge(m_Name);
                    }
                    m_Name = nodeId;
                    setParentEdge(m_Name, (uint)Types.EdgeKind.edkMemberBindingExpressionSyntax_Name);
                }
                else
                {
                    throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.MemberBindingExpressionSyntax.setName(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
                }
            }
            else
            {
                if (m_Name != 0)
                {
                    removeParentEdge(m_Name);
                }
                m_Name = 0;
            }
        }
示例#22
0
 /// <summary>
 /// Adds a new AccessorCall edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new AccessorCall edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addAccessorCall(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.IdentifierNameSyntax.addAccessorCall(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkAccessorDeclarationSyntax))
     {
         AccessorCallContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.IdentifierNameSyntax.setAccessorCall(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkIdentifierNameSyntax_AccessorCall);
     }
 }
示例#23
0
 /// <summary>
 /// Adds a new Parameters edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new Parameters edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addParameters(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.TypeParameterListSyntax.addParameters(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkTypeParameterSyntax))
     {
         ParametersContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.TypeParameterListSyntax.setParameters(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkTypeParameterListSyntax_Parameters);
     }
 }
示例#24
0
 /// <summary>
 /// Adds a new Usings edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new Usings edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addUsings(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.NamespaceDeclarationSyntax.addUsings(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkUsingDirectiveSyntax))
     {
         UsingsContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.NamespaceDeclarationSyntax.setUsings(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     setParentEdge(nodeId, (uint)Types.EdgeKind.edkNamespaceDeclarationSyntax_Usings);
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkNamespaceDeclarationSyntax_Usings);
     }
 }
示例#25
0
 /// <summary>
 /// Adds a new RankSpecifiers edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new RankSpecifiers edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addRankSpecifiers(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ArrayTypeSyntax.addRankSpecifiers(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkArrayRankSpecifierSyntax))
     {
         RankSpecifiersContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.ArrayTypeSyntax.setRankSpecifiers(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     setParentEdge(nodeId, (uint)Types.EdgeKind.edkArrayTypeSyntax_RankSpecifiers);
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkArrayTypeSyntax_RankSpecifiers);
     }
 }
示例#26
0
 /// <summary>
 /// Adds a new Attributes edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new Attributes edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addAttributes(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.XmlElementStartTagSyntax.addAttributes(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkXmlAttributeSyntax))
     {
         AttributesContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Structure.XmlElementStartTagSyntax.setAttributes(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     setParentEdge(nodeId, (uint)Types.EdgeKind.edkXmlElementStartTagSyntax_Attributes);
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkXmlElementStartTagSyntax_Attributes);
     }
 }
示例#27
0
 /// <summary>
 /// Adds a new Initializers edge to the node and inserts it after the other ones.
 /// </summary>
 /// <param name="nodeId">[in] The end point of the new Initializers edge.</param>
 /// <exception cref="Columbus.Csharp.Asg.CsharpException">Throws CsharpException if the given nodeId is invalid.</exception>
 public void addInitializers(uint nodeId)
 {
     if (!fact.getExist(nodeId))
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.AnonymousObjectCreationExpressionSyntax.addInitializers(NodeId)", "The end point of the edge does not exist.");
     }
     Columbus.Csharp.Asg.Nodes.Base.Base node = fact.getRef(nodeId);
     if (Common.getIsBaseClassKind(node.NodeKind, Types.NodeKind.ndkAnonymousObjectMemberDeclaratorSyntax))
     {
         InitializersContainer.AddLast(nodeId);
     }
     else
     {
         throw new CsharpException("Columbus.Csharp.Asg.Nodes.Expression.AnonymousObjectCreationExpressionSyntax.setInitializers(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
     }
     setParentEdge(nodeId, (uint)Types.EdgeKind.edkAnonymousObjectCreationExpressionSyntax_Initializers);
     if (fact.ReverseEdges != null)
     {
         fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkAnonymousObjectCreationExpressionSyntax_Initializers);
     }
 }
 /// <summary>
 /// Visitor for all nodes.
 /// </summary>
 /// <param name="node">[in] This node is being visited.</param>
 public override void visit(Columbus.Csharp.Asg.Nodes.Base.Base node, bool callVirtualBase)
 {
     nodeList.Add(node.Id);
 }
示例#29
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.Csharp.Asg.Nodes.Base.Base node, bool callVirtualBase)
 {
     node.save(io);
 }