PrevUpHomeNext

Class template boolean_or

boost::mixin::combinators::boolean_or

Synopsis

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

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

  // construct/copy/destruct
  boolean_or();

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

Description

A combinator for a boolean or 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_or public construct/copy/destruct

  1. boolean_or();

boolean_or 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 true.

  2. bool result() const;

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

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

PrevUpHomeNext