Ejemplo n.º 1
0
    /* !
     * \brief Checks that two reactions have the same IReaction field values
     * except for medium
     * \param reaction The reaction that will be compared to 'this'.
     */
    protected virtual bool PartialEquals(IReaction reaction)
    {
        //TODO check this

        /*
         * if(!hasValidData() || !reaction.hasValidData())
         * {
         * Logger.Log("IReaction::PartialEquals invalid reaction"
         *         , Logger.Level.ERROR);
         * return false;
         * }
         */

        bool res =
            LinkedListExtensions.Equals(_products, reaction._products) &&
            (_isActive == reaction._isActive) &&
            (_reactionSpeed == reaction._reactionSpeed) &&
            (_energyCost == reaction._energyCost) &&
            (enableSequential == reaction.enableSequential) &&
            (enableEnergy == reaction.enableEnergy)
        ;

        return(res);
    }