/***************************************************************************/

        public void checkModifier(int _modifier)
        {
            if ((_modifier < m_minModifier) || (_modifier > m_maxModifier))
            {
                throw new ArgumentException(
                          string.Format(
                              Resoursers.Exceptions.Messages.wrongInputsCount
                              , LibraryElementKind.toString(m_elementKind)
                              , _modifier
                              , m_minModifier
                              )
                          );
            }
        }
Esempio n. 2
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
                );
        }
Esempio n. 3
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
                );
        }