PrevUpHomeNext

Class template sum

boost::mixin::combinators::sum

Synopsis

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

template<typename MessageReturnType> 
class sum {
public:
  // types
  typedef MessageReturnType result_type;

  // construct/copy/destruct
  sum();

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

Description

A combinator for a sum operation. Sums all the return values of the multicast chain.

Template Parameters

  1. typename MessageReturnType

    The actual return type of the messages.

sum public construct/copy/destruct

  1. sum();

sum public member functions

  1. bool add_result(const MessageReturnType & r);
    The function used by the code generated for multicast messages.
  2. const result_type & result() const;

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

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

PrevUpHomeNext