/*
** Copyright 2014 Centreon
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** For more information : contact@centreon.com
*/

#include "com/centreon/broker/bam/bool_and.hh"

using namespace com::centreon::broker::bam;

/**
 *  Default constructor.
 */
bool_and::bool_and() {}

/**
 *  Copy constructor.
 *
 *  @param[in] right Object to copy.
 */
bool_and::bool_and(bool_and const& right)
  : bool_binary_operator(right) {}

/**
 *  Destructor.
 */
bool_and::~bool_and() {}

/**
 *  Assignment operator.
 *
 *  @param[in] right Object to copy.
 *
 *  @return This object.
 */
bool_and& bool_and::operator=(bool_and const& right) {
  bool_binary_operator::operator=(right);
  return (*this);
}

/**
 *  Get the hard value.
 *
 *  @return Evaluation of the expression with hard values.
 */
double bool_and::value_hard() {
  return (_left_hard && _right_hard);
}

/**
 *  Get the soft value.
 *
 *  @return Evaluation of the expression with soft values.
 */
double bool_and::value_soft() {
  return (_left_soft && _right_soft);
}
