コード例 #1
0
 public CyPhyBuildVisitor(string projectDirectory, CodeGenerator.Mode mode)  // this is a singleton object and the constructor will be called once
 {
     Components = new Dictionary<string, Component>();
     ComponentInstanceGUIDs = new Dictionary<string, Component>();
     Ports = new Dictionary<string, Port>();
     Components.Clear();
     ComponentInstanceGUIDs.Clear();
     Ports.Clear();
     this.ProjectDirectory = projectDirectory;
     this.mode = mode;
 }
コード例 #2
0
 public CyPhyBuildVisitor(string projectDirectory, CodeGenerator.Mode mode, MgaTraceability traceability,
                          Dictionary <string, CyPhy2Schematic.CyPhy2SchematicInterpreter.IDs> mgaIdToDomainIDs, ISet <IMgaObject> selectedSpiceModels) // this is a singleton object and the constructor will be called once
 {
     Components             = new Dictionary <string, Component>();
     ComponentInstanceGUIDs = new Dictionary <string, Component>();
     Ports = new Dictionary <string, Port>();
     this.ProjectDirectory    = projectDirectory;
     this.mode                = mode;
     this.Traceability        = traceability;
     this.mgaIdToDomainIDs    = mgaIdToDomainIDs;
     this.selectedSpiceModels = selectedSpiceModels;
 }
コード例 #3
0
        public CyPhyConnectVisitor(CodeGenerator.Mode mode)
        {
            VisitedPorts = new Dictionary <string, Port>();

            this.mode = mode;
            switch (mode)
            {
            case CodeGenerator.Mode.EDA:
                SchematicModelType = typeof(Tonka.EDAModel);
                break;

            case CodeGenerator.Mode.SPICE:
            case CodeGenerator.Mode.SPICE_SI:
                SchematicModelType = typeof(Tonka.SPICEModel);
                break;

            default:
                throw new NotSupportedException(String.Format("Mode {0} is not supported.", mode.ToString()));
            }
        }
コード例 #4
0
        public CyPhyConnectVisitor(CodeGenerator.Mode mode)
        {
            VisitedPorts = new Dictionary<string, Port>();
            VisitedPorts.Clear();

            this.mode = mode;
            switch (mode)
            {
                case CodeGenerator.Mode.EDA:
                    SchematicModelType = typeof(Tonka.EDAModel);
                    break;
                case CodeGenerator.Mode.SPICE:
                case CodeGenerator.Mode.SPICE_SI:
                    SchematicModelType = typeof(Tonka.SPICEModel);
                    break;
                default:
                    throw new NotSupportedException(String.Format("Mode {0} is not supported.", mode.ToString()));
            }
        }