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) 5 6============================ 7|Logo| Simple Triggers 8============================ 9 10.. contents:: 11 12Introduction 13------------ 14 15Triggers in the `process group`_ interface are used to asynchronously 16receive and process messages destined for distributed data 17structures. The trigger interface is relatively versatile, permitting 18one to attach any function object to handle requests. The 19``simple_trigger`` function simplifies a common case for triggers: 20attaching a trigger that invokes a specific member function of the 21distributed data structure. 22 23Where Defined 24------------- 25 26Header ``<boost/graph/parallel/simple_trigger.hpp>`` 27 28Reference 29--------- 30 31 :: 32 33 template<typename ProcessGroup, typename Class, typename T> 34 void 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)) 38 39 template<typename ProcessGroup, typename Class, typename T, typename Result> 40 void 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)) 44 45The ``simple_trigger`` function registers a trigger that invokes the 46given member function (``pmf``) on the object ``self`` whenever a 47message is received. If the member function has a return value, then 48the trigger has a reply, and can only be used via out-of-band sends 49that expect a reply. Otherwise, the member function returns ``void``, 50and the function is registered as a normal trigger. 51 52 53----------------------------------------------------------------------------- 54 55Copyright (C) 2007 Douglas Gregor 56 57Copyright (C) 2007 Matthias Troyer 58 59.. |Logo| image:: pbgl-logo.png 60 :align: middle 61 :alt: Parallel BGL 62 :target: http://www.osl.iu.edu/research/pbgl 63 64.. _process group: process_group.html 65