PrevUpHomeNext

Class template boolean_and

boost::mixin::combinators::boolean_and

Synopsis

// In header: <boost/mixin/combinators.hpp>

template<typename MessageReturnType = bool> 
class boolean_and {
public:
  // types
  typedef bool result_type;

  // construct/copy/destruct
  boolean_and();

  // public member functions
  bool add_result(const MessageReturnType &);
  bool result() const;
  void reset();
};

Description

A combinator for a boolean and operation.

Template Parameters

  1. typename MessageReturnType = bool

    The actual return type of the messages. Its default value is bool, but such an operation is valid for various other classes that can be cast to bool, such as pointers, std streams, etc.

boolean_and public construct/copy/destruct

  1. boolean_and();

boolean_and public member functions

  1. bool add_result(const MessageReturnType & r);

    The function used by the code generated for multicast messages. Stops the execution of the multicast chain at the first false.

  2. bool result() const;

    The result of the operation if the multicast call has been made with an input/ouput parameter - an instance of boolean_and

  3. void reset();
    Resets the result, so the instance could be reused.

PrevUpHomeNext