Пример #1
0
        /// <summary>
        /// Adds a new hasParameterType edge to the node.
        /// </summary>
        /// <param name="nodeId">[in] The end point of the new hasParameterType 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 addHasParameterType(uint nodeId, Types.ParameterKind acValue)
        {
            if (!fact.getExist(nodeId))
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerMethod.addHasParameterType(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.acParameterKind = acValue;

                hasParameterTypeAssocContainer.AddLast(ac);
            }
            else
            {
                throw new LimException("Columbus.Lim.Asg.Nodes.Type.TypeFormerMethod.setHasParameterType(NodeId)", "Invalid NodeKind (" + node.NodeKind.ToString() + ").");
            }
            if (fact.ReverseEdges != null)
            {
                fact.ReverseEdges.insertEdge(nodeId, this.Id, Types.EdgeKind.edkTypeFormerMethod_HasParameterType);
            }
        }
Пример #2
0
        /// <summary>
        /// Loads the node.
        /// </summary>
        /// <param name="io">[in] The node is read from io.</param>
        /// <exception cref="Columbus.ColumbusIOException">Throws ColumbusIOException if there is something wrong with the file.</exception>
        public override void load(IO binIo)
        {
            base.load(binIo);

            m_paramKind = (Types.ParameterKind)binIo.readUByte1();

            m_hasType = binIo.readUInt4();
        }
Пример #3
0
        /// <summary>
        /// Loads the node.
        /// </summary>
        /// <param name="io">[in] The node is read from io.</param>
        /// <exception cref="Columbus.ColumbusIOException">Throws ColumbusIOException if there is something wrong with the file.</exception>
        public override void load(IO binIo)
        {
            base.load(binIo);

            m_hasReturnType = binIo.readUInt4();

            uint _id;

            _id = binIo.readUInt4();
            while (_id != 0)
            {
                Types.ParameterKind _ac = (Types.ParameterKind)(binIo.readUByte1());
                ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Type.Type> .AssocEdge hasParameterTypeAc = new ListIteratorAssoc <Columbus.Lim.Asg.Nodes.Type.Type> .AssocEdge();

                hasParameterTypeAc.assocClass.acParameterKind = _ac;
                hasParameterTypeAc.id = _id;
                hasParameterTypeAssocContainer.AddLast(hasParameterTypeAc);
                _id = binIo.readUInt4();
            }
        }
Пример #4
0
 public override void visitTypeFormerMethod_HasParameterType(uint begin, uint end, Types.ParameterKind ac)
 {
     revEdges.insertEdge(end, begin, Types.EdgeKind.edkTypeFormerMethod_HasParameterType);
 }
Пример #5
0
 /// <summary>
 /// Constructor, only factory can instantiates nodes.
 /// </summary>
 /// <param name="nodeId">[in] The id of the node.</param>
 /// <param name="factory">[in] Poiter to the Factory the node belongs to.</param>
 public Parameter(uint nodeId, Factory factory) : base(nodeId, factory)
 {
     m_paramKind = Types.ParameterKind.pmkIn;
     m_hasType   = 0;
 }
Пример #6
0
        // ---------- Edge setter function(s) ----------

        /// <summary>
        /// Adds a new hasParameterType edge to the node.
        /// </summary>
        /// <param name="node">[in] The end point of the new hasParameterType edge.</param>
        /// <param name="acValue">[in] The value of the association class.</param>
        /// <exception cref="Columbus.Lim.Asg.LimException">Throws LimException if there is something wrong with the given node.</exception>
        public void addHasParameterType(Columbus.Lim.Asg.Nodes.Type.Type node, Types.ParameterKind acValue)
        {
            addHasParameterType(node.Id, acValue);
        }