/***************************************************************************/ public ILogicalElement createLogicalElement( LibraryElementKind.Enum _kind , int _modifier ) { return(new LogicalElement( ms_currentID++ , ms_elementTypes[_kind] , _modifier )); }
/***************************************************************************/ public LibraryElementType( LibraryElementKind.Enum _elementKind , EvalFunction _evalFunction , CalculateLinesFunction _calculateInputsFunction , CalculateLinesFunction _calculateOutputsFuction , int _minModifier , int _maxModifier ) { m_elementKind = _elementKind; m_evalFunction = _evalFunction; m_calculateInputsFunction = _calculateInputsFunction; m_calculateOutputsFuction = _calculateOutputsFuction; m_minModifier = _minModifier; m_maxModifier = _maxModifier; }
/***************************************************************************/ 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 ); }
/***************************************************************************/ 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 ); }