public void RegisterArchitectures(ILibrary library)
        {
            if(library == null)
                throw new ArgumentNullException("library");

            library.AddArchitecture(new TransitionArchitectures());
        }
        public void RegisterArchitectures(ILibrary library)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            library.AddArchitecture(new TransitionArchitectures());
        }
예제 #3
0
        public IEntity PublishToLibrary(string domain, string architectureLabel, string entityLabel, string entitySymbol)
        {
            IEntity entity = BuildEntity(new MathIdentifier(entityLabel, domain), entitySymbol);
            IArchitectureFactory factory = BuildArchitectureFactory(new MathIdentifier(architectureLabel, domain), entity.EntityId);
            ILibrary             lib     = Service <ILibrary> .Instance;

            lib.AddEntity(entity);
            lib.AddArchitecture(factory);
            return(entity);
        }
예제 #4
0
        public static void PublishToLibrary(string xml, ILibrary library, MathIdentifier architectureId, MathIdentifier entityId)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            IArchitectureFactory factory = BuildArchitectureFactory(xml, architectureId, entityId);

            library.AddArchitecture(factory);
        }
예제 #5
0
        public static IEntity PublishToLibrary(string xml, ILibrary library, string domain, string architectureLabel, string entityLabel, string entitySymbol)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            IEntity entity = ReadXmlEntity(xml, new MathIdentifier(entityLabel, domain), entitySymbol);
            IArchitectureFactory factory = BuildArchitectureFactory(xml, new MathIdentifier(architectureLabel, domain), entity.EntityId, entity.InputSignals.Length, entity.OutputSignals.Length, entity.Buses.Length);

            library.AddEntity(entity);
            library.AddArchitecture(factory);
            return(entity);
        }
        public void RegisterArchitectures(ILibrary library)
        {
            if(library == null)
                throw new ArgumentNullException("library");

            #region Arithmetics
            library.AddArchitecture(new Arithmetics.AdditionArchitectures());
            library.AddArchitecture(new Arithmetics.SubtractionArchitectures());
            library.AddArchitecture(new Arithmetics.MultiplicationArchitectures());
            library.AddArchitecture(new Arithmetics.DivisionArchitectures());
            library.AddArchitecture(new Arithmetics.NegateArchitectures());
            library.AddArchitecture(new Arithmetics.InvertArchitectures());
            library.AddArchitecture(new Arithmetics.AbsoluteArchitectures());
            library.AddArchitecture(new Arithmetics.ExponentialArchitectures());
            library.AddArchitecture(new Arithmetics.NaturalLogarithmArchitectures());
            library.AddArchitecture(new Arithmetics.SquareArchitectures());
            library.AddArchitecture(new Arithmetics.PowerArchitectures());
            #endregion
            #region Trigonometry
            library.AddArchitecture(new Trigonometry.SineArchitectures());
            library.AddArchitecture(new Trigonometry.CosineArchitectures());
            library.AddArchitecture(new Trigonometry.TangentArchitectures());
            library.AddArchitecture(new Trigonometry.CotangentArchitectures());
            library.AddArchitecture(new Trigonometry.SecantArchitectures());
            library.AddArchitecture(new Trigonometry.CosecantArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicSineArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCosineArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicTangentArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCotangentArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicSecantArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCosecantArchitectures());
            #endregion
            #region Logic
            library.AddArchitecture(new Logic.AndArchitectures());
            library.AddArchitecture(new Logic.NandArchitectures());
            library.AddArchitecture(new Logic.OrArchitectures());
            library.AddArchitecture(new Logic.NorArchitectures());
            library.AddArchitecture(new Logic.XorArchitectures());
            library.AddArchitecture(new Logic.XnorArchitectures());
            library.AddArchitecture(new Logic.NotArchitectures());
            #endregion
            #region Algebra & Analysis
            library.AddArchitecture(new Analysis.AlgebraicDerivativeArchitecture());
            library.AddArchitecture(new Algebra.AutoSimplifyArchitecture());
            #endregion
            #region Flow
            library.AddArchitecture(new Flow.TransportArchitecture());
            library.AddArchitecture(new Flow.SyncArchitecture());
            library.AddArchitecture(new Flow.ClockArchitecture());
            #endregion
        }
예제 #7
0
        public void RegisterArchitectures(ILibrary library)
        {
            if (library == null)
            {
                throw new ArgumentNullException("library");
            }

            #region Arithmetics
            library.AddArchitecture(new Arithmetics.AdditionArchitectures());
            library.AddArchitecture(new Arithmetics.SubtractionArchitectures());
            library.AddArchitecture(new Arithmetics.MultiplicationArchitectures());
            library.AddArchitecture(new Arithmetics.DivisionArchitectures());
            library.AddArchitecture(new Arithmetics.NegateArchitectures());
            library.AddArchitecture(new Arithmetics.InvertArchitectures());
            library.AddArchitecture(new Arithmetics.AbsoluteArchitectures());
            library.AddArchitecture(new Arithmetics.ExponentialArchitectures());
            library.AddArchitecture(new Arithmetics.NaturalLogarithmArchitectures());
            library.AddArchitecture(new Arithmetics.SquareArchitectures());
            library.AddArchitecture(new Arithmetics.PowerArchitectures());
            #endregion
            #region Trigonometry
            library.AddArchitecture(new Trigonometry.SineArchitectures());
            library.AddArchitecture(new Trigonometry.CosineArchitectures());
            library.AddArchitecture(new Trigonometry.TangentArchitectures());
            library.AddArchitecture(new Trigonometry.CotangentArchitectures());
            library.AddArchitecture(new Trigonometry.SecantArchitectures());
            library.AddArchitecture(new Trigonometry.CosecantArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicSineArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCosineArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicTangentArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCotangentArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicSecantArchitectures());
            library.AddArchitecture(new Trigonometry.HyperbolicCosecantArchitectures());
            #endregion
            #region Logic
            library.AddArchitecture(new Logic.AndArchitectures());
            library.AddArchitecture(new Logic.NandArchitectures());
            library.AddArchitecture(new Logic.OrArchitectures());
            library.AddArchitecture(new Logic.NorArchitectures());
            library.AddArchitecture(new Logic.XorArchitectures());
            library.AddArchitecture(new Logic.XnorArchitectures());
            library.AddArchitecture(new Logic.NotArchitectures());
            #endregion
            #region Algebra & Analysis
            library.AddArchitecture(new Analysis.AlgebraicDerivativeArchitecture());
            library.AddArchitecture(new Algebra.AutoSimplifyArchitecture());
            #endregion
            #region Flow
            library.AddArchitecture(new Flow.TransportArchitecture());
            library.AddArchitecture(new Flow.SyncArchitecture());
            library.AddArchitecture(new Flow.ClockArchitecture());
            #endregion
        }
예제 #8
0
        public static IEntity PublishToLibrary(string xml, ILibrary library, string domain, string architectureLabel, string entityLabel, string entitySymbol)
        {
            if(library == null)
                throw new ArgumentNullException("library");

            IEntity entity = ReadXmlEntity(xml, new MathIdentifier(entityLabel, domain), entitySymbol);
            IArchitectureFactory factory = BuildArchitectureFactory(xml, new MathIdentifier(architectureLabel, domain), entity.EntityId, entity.InputSignals.Length, entity.OutputSignals.Length, entity.Buses.Length);
            library.AddEntity(entity);
            library.AddArchitecture(factory);
            return entity;
        }
예제 #9
0
        public static void PublishToLibrary(string xml, ILibrary library, MathIdentifier architectureId, MathIdentifier entityId)
        {
            if(library == null)
                throw new ArgumentNullException("library");

            IArchitectureFactory factory = BuildArchitectureFactory(xml, architectureId, entityId);
            library.AddArchitecture(factory);
        }