Exemple #1
0
        /***************************************************************************/

        private void createPortElementType(
            LogicalModel.API.PortDirection _kind
            , EvalFunction _evalFunction
            , CalculateLinesFunction _inputsLinesCalculator
            , CalculateLinesFunction _outputsLinesCalculator
            )
        {
            ms_portElementTypes[_kind] = new LibraryElementType(
                LibraryElementKind.Enum.Port
                , _evalFunction
                , _inputsLinesCalculator
                , _outputsLinesCalculator
                , 0
                , 0
                );
        }
Exemple #2
0
        /***************************************************************************/

        private void createPrimitiveElementType(
            LibraryElementKind.Enum _kind
            , EvalFunction _evalFunction
            )
        {
            if (!LibraryElementKind.isSimpleElement(_kind))
            {
                throw new ArgumentException(
                          string.Format(Resoursers.Exceptions.Messages.nonPrimitiveElement, LibraryElementKind.toString(_kind))
                          );
            }

            ms_elementTypes[_kind] = new LibraryElementType(
                _kind
                , _evalFunction
                , LogicalFunctionsLibrary.primitivesInputsCalculator
                , LogicalFunctionsLibrary.primitivesOutputsCalculator
                , ms_minPrimitivesModifier
                , ms_maxPrimitivesModifier
                );
        }
Exemple #3
0
        /***************************************************************************/

        private void createNotPrimitiveElementType(
            LibraryElementKind.Enum _kind
            , EvalFunction _evalFunction
            , CalculateLinesFunction _inputsLinesCalculator
            , CalculateLinesFunction _outputsLinesCalculator
            )
        {
            if (LibraryElementKind.isSimpleElement(_kind))
            {
                throw new ArgumentException(
                          string.Format(Resoursers.Exceptions.Messages.primitiveElement, LibraryElementKind.toString(_kind))
                          );
            }

            ms_elementTypes[_kind] = new LibraryElementType(
                _kind
                , _evalFunction
                , _inputsLinesCalculator
                , _outputsLinesCalculator
                , ms_minNotPrimitivesModifier
                , ms_maxNotPrimitivesModifier
                );
        }