Beispiel #1
0
        private void VisitVariantMatchStructure(SourceModel.VariantMatchStructure variantMatchStructure)
        {
            var variantMatchStructureDfir = new Nodes.VariantMatchStructure(_currentDiagram);

            _map.AddMapping(variantMatchStructure, variantMatchStructureDfir);
            int diagramIndex = 0;

            foreach (NestedDiagram nestedDiagram in variantMatchStructure.NestedDiagrams)
            {
                NationalInstruments.Dfir.Diagram dfirDiagram;
                if (diagramIndex == 0)
                {
                    dfirDiagram = variantMatchStructureDfir.Diagrams[0];
                }
                else
                {
                    dfirDiagram = variantMatchStructureDfir.CreateDiagram();
                }
                _map.AddMapping(nestedDiagram, dfirDiagram);
                ++diagramIndex;
            }

            foreach (BorderNode borderNode in variantMatchStructure.BorderNodes)
            {
                NationalInstruments.Dfir.BorderNode dfirBorderNode = TranslateBorderNode(borderNode, variantMatchStructureDfir);
                MapBorderNode(borderNode, dfirBorderNode);
            }

            foreach (NestedDiagram nestedDiagram in variantMatchStructure.NestedDiagrams)
            {
                nestedDiagram.AcceptVisitor(this);
            }
        }
        /// <inheritdoc />
        protected override Node CopyNodeInto(Node newParentNode, NodeCopyInfo copyInfo)
        {
            var copiedVariantMatchStructure = new VariantMatchStructure((Diagram)newParentNode, this, copyInfo);

            copiedVariantMatchStructure.CloneDiagrams(this, copyInfo);
            copiedVariantMatchStructure.CloneBorderNodes(this, copyInfo);
            copiedVariantMatchStructure.CopyContents(this, copyInfo);
            return(copiedVariantMatchStructure);
        }
 private VariantMatchStructure(Diagram parentDiagram, VariantMatchStructure nodeToCopy, NodeCopyInfo nodeCopyInfo)
     : base(parentDiagram, nodeToCopy, nodeCopyInfo)
 {
 }
 public VariantMatchStructureSelector(VariantMatchStructure parentVariantMatchStructure)
     : base(parentVariantMatchStructure)
 {
     CreateStandardTerminals(NationalInstruments.CommonModel.Direction.Input, 1u, 1u, NITypes.Void);
 }
 private VariantMatchStructureSelector(VariantMatchStructure parentStructure, VariantMatchStructureSelector toCopy, NodeCopyInfo copyInfo)
     : base(parentStructure, toCopy, copyInfo)
 {
 }