Esempio n. 1
0
        private void VisitOptionPatternStructure(SourceModel.OptionPatternStructure pattern)
        {
            var patternDfir = new Nodes.OptionPatternStructure(_currentDiagram);

            _map.AddMapping(pattern, patternDfir);
            int diagramIndex = 0;

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

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

            foreach (NestedDiagram nestedDiagram in pattern.NestedDiagrams)
            {
                nestedDiagram.AcceptVisitor(this);
            }
        }
Esempio n. 2
0
        /// <inheritdoc />
        protected override Node CopyNodeInto(Node newParentNode, NodeCopyInfo copyInfo)
        {
            OptionPatternStructure copiedOptionPatternStructure = new OptionPatternStructure((Diagram)newParentNode, this, copyInfo);

            copiedOptionPatternStructure.CloneDiagrams(this, copyInfo);
            copiedOptionPatternStructure.CloneBorderNodes(this, copyInfo);
            copiedOptionPatternStructure.CopyContents(this, copyInfo);
            return(copiedOptionPatternStructure);
        }
 public OptionPatternStructureSelector(OptionPatternStructure parentOptionPatternStructure) : base(parentOptionPatternStructure)
 {
     CreateStandardTerminals(NationalInstruments.CommonModel.Direction.Input, 1u, 1u, NITypes.Void);
 }
Esempio n. 4
0
 private OptionPatternStructure(Diagram parentDiagram, OptionPatternStructure nodeToCopy, NodeCopyInfo nodeCopyInfo)
     : base(parentDiagram, nodeToCopy, nodeCopyInfo)
 {
 }