Esempio n. 1
0
        /// <summary>
        /// An edge can define a cluster as logical head.
        /// This is used to fake edges to and from clusters by clipping the edge on the borders of the logical head.
        /// </summary>
        public void SetLogicalHead(SubGraph lhead)
        {
            if (!lhead.IsCluster())
            {
                throw new InvalidOperationException("ltail must be a cluster");
            }
            if (!MyRootGraph.IsCompound())
            {
                throw new InvalidOperationException("rootgraph must be compound for lheads/ltails to be used");
            }
            string lheadname = lhead.GetName();

            SafeSetAttribute("lhead", lheadname, "");
        }
Esempio n. 2
0
        /// <summary>
        /// An edge can define a cluster as logical head.
        /// This is used to fake edges to and from clusters by clipping the edge on the borders of the logical head.
        /// </summary>
        public SubGraph LogicalHead()
        {
            if (!MyRootGraph.IsCompound())
            {
                throw new InvalidOperationException("rootgraph must be compound for lheads/ltails to be used");
            }
            string lheadname = GetAttribute("lhead");

            if (lheadname == null)
            {
                return(null);
            }
            return(MyRootGraph.GetSubgraph(lheadname));
        }