1 .. Copyright (C) 2004-2008 The Trustees of Indiana University.
2 Use, modification and distribution is subject to the Boost Software
3 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
4 http://www.boost.org/LICENSE_1_0.txt)
6 ============================
8 ============================
15 Triggers in the `process group`_ interface are used to asynchronously
16 receive and process messages destined for distributed data
17 structures. The trigger interface is relatively versatile, permitting
18 one to attach any function object to handle requests. The
19 ``simple_trigger`` function simplifies a common case for triggers:
20 attaching a trigger that invokes a specific member function of the
21 distributed data structure.
26 Header ``<boost/graph/parallel/simple_trigger.hpp>``
33 template<typename ProcessGroup, typename Class, typename T>
35 simple_trigger(ProcessGroup& pg, int tag, Class* self,
36 void (Class::*pmf)(int source, int tag, const T& data,
37 trigger_receive_context context))
39 template<typename ProcessGroup, typename Class, typename T, typename Result>
41 simple_trigger(ProcessGroup& pg, int tag, Class* self,
42 Result (Class::*pmf)(int source, int tag, const T& data,
43 trigger_receive_context context))
45 The ``simple_trigger`` function registers a trigger that invokes the
46 given member function (``pmf``) on the object ``self`` whenever a
47 message is received. If the member function has a return value, then
48 the trigger has a reply, and can only be used via out-of-band sends
49 that expect a reply. Otherwise, the member function returns ``void``,
50 and the function is registered as a normal trigger.
53 -----------------------------------------------------------------------------
55 Copyright (C) 2007 Douglas Gregor
57 Copyright (C) 2007 Matthias Troyer
59 .. |Logo| image:: pbgl-logo.png
62 :target: http://www.osl.iu.edu/research/pbgl
64 .. _process group: process_group.html