Boost logo

Boost-Commit :

From: srajko_at_[hidden]
Date: 2007-06-12 15:57:47


Author: srajko
Date: 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
New Revision: 7011
URL: http://svn.boost.org/trac/boost/changeset/7011

Log:
add fused and unfused versions of all components, introduce generic components, change docs to qb+doxyref, separate out tests

Added:
   sandbox/SOC/2007/signals/boost/fusion/
   sandbox/SOC/2007/signals/boost/fusion/sequence/
   sandbox/SOC/2007/signals/boost/fusion/sequence/container/
   sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/
   sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/detail/
   sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/detail/vector_n.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/vector.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/last_value.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/applicator.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/conditional.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/detail/connect.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/detail/storable.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/instantiator.hpp (contents, props changed)
   sandbox/SOC/2007/signals/boost/signal_network/modifier.hpp (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/components.qbk (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/connections.qbk (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow1.svg (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow2.svg (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow3.svg (contents, props changed)
   sandbox/SOC/2007/signals/libs/signal_network/doc/introduction.qbk (contents, props changed)
Removed:
   sandbox/SOC/2007/signals/boost/signal_network/detail/defines.hpp
   sandbox/SOC/2007/signals/boost/signal_network/detail/loader.hpp
   sandbox/SOC/2007/signals/boost/signal_network/detail/main_class_loader.hpp
   sandbox/SOC/2007/signals/boost/signal_network/detail/slot_type_template.hpp
   sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader.hpp
   sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader2.hpp
   sandbox/SOC/2007/signals/libs/signal_network/doc/dox/boost/
Binary files modified:
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/cdecls.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/decls.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/files.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/imports.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/pbxindex.header
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/refs.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/subclasses.pbxbtree
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/symbols0.pbxsymbols
Text files modified:
   sandbox/SOC/2007/signals/boost/signal_network/base.hpp | 70 +++-
   sandbox/SOC/2007/signals/boost/signal_network/chain.hpp | 80 ++--
   sandbox/SOC/2007/signals/boost/signal_network/counter.hpp | 72 ++-
   sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot_template.hpp | 6
   sandbox/SOC/2007/signals/boost/signal_network/detail/connect_template.hpp | 6
   sandbox/SOC/2007/signals/boost/signal_network/filter.hpp | 101 +++++-
   sandbox/SOC/2007/signals/boost/signal_network/function.hpp | 72 ++-
   sandbox/SOC/2007/signals/boost/signal_network/junction.hpp | 75 ++--
   sandbox/SOC/2007/signals/boost/signal_network/mutex.hpp | 38 -
   sandbox/SOC/2007/signals/boost/signal_network/selector.hpp | 34 +
   sandbox/SOC/2007/signals/boost/signal_network/socket_receiver.hpp | 24 +
   sandbox/SOC/2007/signals/boost/signal_network/socket_sender.hpp | 60 ++-
   sandbox/SOC/2007/signals/boost/signal_network/storage.hpp | 159 +++++++---
   sandbox/SOC/2007/signals/boost/signal_network/timed_generator.hpp | 221 +++++++-------
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/Release/test.build/Script-080DD7660C1390D400EEB53D.sh | 4
   sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj | 342 +++++++++++++++++++++-
   sandbox/SOC/2007/signals/libs/signal_network/doc/Jamfile.v2 | 104 +++---
   sandbox/SOC/2007/signals/libs/signal_network/doc/dox/signal_network.hpp | 184 -----------
   sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk | 252 ++++++----------
   sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network_doxygen.xml | 512 +++++++++-----------------------
   sandbox/SOC/2007/signals/libs/signal_network/example/Jamfile.v2 | 33 -
   sandbox/SOC/2007/signals/libs/signal_network/example/example.cpp | 611 ---------------------------------------
   sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 | 54 ++-
   sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp | 59 +++
   sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp | 25 +
   sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp | 49 ++-
   sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp | 95 ++++--
   sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp | 65 ++-
   sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp | 74 ++--
   sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp | 64 +++-
   30 files changed, 1572 insertions(+), 1973 deletions(-)

Added: sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/detail/vector_n.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/detail/vector_n.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,174 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+// No include guard. This file is meant to be included many times
+
+#if !defined(FUSION_MACRO_05042005)
+#define FUSION_MACRO_05042005
+
+#define FUSION_MEMBER_DEFAULT_INIT(z, n, _) m##n(T##n())
+#define FUSION_MEMBER_INIT(z, n, _) m##n(_##n)
+#define FUSION_COPY_INIT(z, n, _) m##n(other.m##n)
+#define FUSION_MEMBER_DECL(z, n, _) T##n m##n;
+
+#define FUSION_MEMBER_ASSIGN(z, n, _) \
+ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n);
+
+#define FUSION_DEREF_MEMBER_ASSIGN(z, n, _) \
+ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n);
+
+#define FUSION_AT_IMPL(z, n, _) \
+ typename add_reference<T##n>::type \
+ at_impl(mpl::int_<n>) { return this->m##n; } \
+ typename add_reference<typename add_const<T##n>::type>::type \
+ at_impl(mpl::int_<n>) const { return this->m##n; }
+
+#define FUSION_ITER_DECL_VAR(z, n, _) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I, BOOST_PP_DEC(n))>::type BOOST_PP_CAT(I, n); \
+ BOOST_PP_CAT(I, n) BOOST_PP_CAT(i, n) \
+ = fusion::next(BOOST_PP_CAT(i, BOOST_PP_DEC(n)));
+
+#endif
+
+#define N BOOST_PP_ITERATION()
+
+ template <typename Derived, BOOST_PP_ENUM_PARAMS(N, typename T)>
+ struct BOOST_PP_CAT(vector_data, N) : sequence_base<Derived>
+ {
+ BOOST_PP_CAT(vector_data, N)()
+ : BOOST_PP_ENUM(N, FUSION_MEMBER_DEFAULT_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : BOOST_PP_ENUM(N, FUSION_MEMBER_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)(
+ BOOST_PP_CAT(vector_data, N) const& other)
+ : BOOST_PP_ENUM(N, FUSION_COPY_INIT, _) {}
+
+ BOOST_PP_CAT(vector_data, N)&
+ operator=(BOOST_PP_CAT(vector_data, N) const& vec)
+ {
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ template <typename Sequence>
+ static BOOST_PP_CAT(vector_data, N)
+ init_from_sequence(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
+ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+
+ template <typename Sequence>
+ static BOOST_PP_CAT(vector_data, N)
+ init_from_sequence(Sequence & seq)
+ {
+ typedef typename result_of::begin<Sequence>::type I0;
+ I0 i0 = fusion::begin(seq);
+ BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
+ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i));
+ }
+
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_DECL, _)
+ };
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename T)>
+ struct BOOST_PP_CAT(vector, N)
+ : BOOST_PP_CAT(vector_data, N)<
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)>
+ , BOOST_PP_ENUM_PARAMS(N, T)>
+ {
+ typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> this_type;
+ typedef BOOST_PP_CAT(vector_data, N)<this_type, BOOST_PP_ENUM_PARAMS(N, T)> base_type;
+ typedef mpl::BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<N> size;
+
+ BOOST_PP_CAT(vector, N)() {}
+
+#if (N == 1)
+ explicit
+#endif
+ BOOST_PP_CAT(vector, N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ N, typename detail::call_param<T, >::type _))
+ : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector, N)(
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> & vec)
+ : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector, N)(
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
+ : base_type(BOOST_PP_ENUM_PARAMS(N, vec.m)) {}
+
+ template <typename Sequence>
+ BOOST_PP_CAT(vector, N)(
+ Sequence & seq
+#if (N == 1)
+ , typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0
+#endif
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+
+ template <typename Sequence>
+ BOOST_PP_CAT(vector, N)(
+ Sequence const& seq
+#if (N == 1)
+ , typename disable_if<is_convertible<Sequence, T0> >::type* dummy = 0
+#endif
+ )
+ : base_type(base_type::init_from_sequence(seq)) {}
+
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector, N)&
+ operator=(BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, U)> const& vec)
+ {
+ BOOST_PP_REPEAT(N, FUSION_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ template <typename Sequence>
+ typename disable_if<is_convertible<Sequence, T0>, this_type&>::type
+ operator=(Sequence const& seq)
+ {
+ typedef typename result_of::begin<Sequence const>::type I0;
+ I0 i0 = fusion::begin(seq);
+ BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_ITER_DECL_VAR, _)
+ BOOST_PP_REPEAT(N, FUSION_DEREF_MEMBER_ASSIGN, _)
+ return *this;
+ }
+
+ BOOST_PP_REPEAT(N, FUSION_AT_IMPL, _)
+
+ template<typename I>
+ typename add_reference<typename mpl::at<types, I>::type>::type
+ at_impl(I i)
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename add_reference<typename add_const<typename mpl::at<types, I>::type>::type>::type
+ at_impl(I i) const
+ {
+ return this->at_impl(mpl::int_<I::value>());
+ }
+ };
+
+#undef N
+

Added: sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/fusion/sequence/container/vector/vector.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,166 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#if !defined(FUSION_VECTOR_07072005_1244)
+#define FUSION_VECTOR_07072005_1244
+
+#include <boost/fusion/sequence/container/vector/vector_fwd.hpp>
+#include <boost/fusion/sequence/container/vector/detail/vector_n_chooser.hpp>
+#include <boost/fusion/sequence/conversion/detail/as_vector.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/detail/workaround.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct fusion_sequence_tag;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct vector
+ : sequence_base<vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)> >
+ {
+ private:
+
+ typedef typename detail::vector_n_chooser<
+ BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
+ vector_n;
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ friend struct vector;
+
+ public:
+
+ typedef typename vector_n::types types;
+ typedef typename vector_n::fusion_tag fusion_tag;
+ typedef typename vector_n::tag tag;
+ typedef typename vector_n::size size;
+ typedef typename vector_n::category category;
+ typedef typename vector_n::is_view is_view;
+
+ vector()
+ : vec() {}
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
+ : vec(rhs.vec) {}
+
+ vector(vector const& rhs)
+ : vec(rhs.vec) {}
+
+ template <typename Sequence>
+ vector(Sequence const& rhs)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+ : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
+#else
+ : vec(rhs) {}
+#endif
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ vector(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> & rhs)
+ : vec(rhs.vec) {}
+
+ vector(vector & rhs)
+ : vec(rhs.vec) {}
+
+ template <typename Sequence>
+ vector(Sequence & rhs)
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+ : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
+#else
+ : vec(rhs) {}
+#endif
+
+ // Expand a couple of forwarding constructors for arguments
+ // of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
+ //
+ // vector(
+ // typename detail::call_param<T0>::type _0
+ // , typename detail::call_param<T1>::type _1)
+ // : vec(_0, _1) {}
+ #include <boost/fusion/sequence/container/vector/detail/vector_forward_ctor.hpp>
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename U)>
+ vector&
+ operator=(vector<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, U)> const& rhs)
+ {
+ vec = rhs.vec;
+ return *this;
+ }
+
+ template <typename T>
+ vector&
+ operator=(T const& rhs)
+ {
+ vec = rhs;
+ return *this;
+ }
+
+ template <int N>
+ typename add_reference<
+ typename mpl::at_c<types, N>::type
+ >::type
+ at_impl(mpl::int_<N> index)
+ {
+ return vec.at_impl(index);
+ }
+
+ template <int N>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at_c<types, N>::type
+ >::type
+ >::type
+ at_impl(mpl::int_<N> index) const
+ {
+ return vec.at_impl(index);
+ }
+
+ template <typename I>
+ typename add_reference<
+ typename mpl::at<types, I>::type
+ >::type
+ at_impl(I index)
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename add_reference<
+ typename add_const<
+ typename mpl::at<types, I>::type
+ >::type
+ >::type
+ at_impl(I index) const
+ {
+ return vec.at_impl(mpl::int_<I::value>());
+ }
+
+ private:
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
+ static vector_n const&
+ ctor_helper(vector const& rhs, mpl::true_)
+ {
+ return rhs.vec;
+ }
+
+ template <typename T>
+ static T const&
+ ctor_helper(T const& rhs, mpl::false_)
+ {
+ return rhs;
+ }
+#endif
+
+ vector_n vec;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2007/signals/boost/last_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/last_value.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,53 @@
+// last_value function object (documented as part of Boost.Signals)
+
+// Copyright Douglas Gregor 2001-2003. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org/libs/signals
+
+#ifndef BOOST_LAST_VALUE_HPP
+#define BOOST_LAST_VALUE_HPP
+
+#include <cassert>
+
+namespace boost {
+ template<typename T>
+ struct last_value {
+ typedef T result_type;
+
+ template<typename InputIterator>
+ T operator()(InputIterator first, InputIterator last) const
+ {
+ assert(first != last);
+ T value = *first++;
+ while (first != last)
+ value = *first++;
+ return value;
+ }
+ };
+
+ template<>
+ struct last_value<void> {
+#ifdef BOOST_NO_VOID_RETURNS
+ struct unusable {};
+
+ public:
+ typedef unusable result_type;
+#else
+ public:
+ typedef void result_type;
+#endif // BOOST_NO_VOID_RETURNS
+
+ template<typename InputIterator>
+ result_type
+ operator()(InputIterator first, InputIterator last) const
+ {
+ while (first != last)
+ *first++;
+ return result_type();
+ }
+ };
+}
+#endif // BOOST_SIGNALS_LAST_VALUE_HPP

Added: sandbox/SOC/2007/signals/boost/signal_network/applicator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/applicator.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,64 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef SIGNAL_NETWORK_APPLICATOR_HPP
+#define SIGNAL_NETWORK_APPLICATOR_HPP
+
+#include <boost/signal_network/filter.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/signal_network/detail/unfused_inherited.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+
+template<
+typename Application,
+typename Member,
+typename Signature,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group> >
+class applicator : public filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare>
+{
+ typedef filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare> base_type;
+
+public:
+#ifndef DOXYGEN_DOCS_ONLY
+ typedef boost::fusion::unfused_inherited<applicator<Application, Member, Signature,
+ typename OutSignal::default_unfused_type, Combiner, Group, GroupCompare>,
+ typename mpl::vector<>::type,
+ typename base_type::parameter_types > unfused;
+
+ template <class Seq>
+ struct result : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+ typename base_type::signal_type::result_type> {};
+#endif
+
+ /** Applies an instance of Application to the Member object.
+ */
+ template <class Seq>
+#ifndef DOXYGEN_DOCS_ONLY
+ typename boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+#endif
+ typename base_type::signal_type::result_type
+#ifndef DOXYGEN_DOCS_ONLY
+ >::type
+#endif
+ operator()(const Seq &seq)
+ {
+ Application()(member);
+ return fused_out(seq);
+ }
+protected:
+ Member member;
+};
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+#endif // SIGNAL_NETWORK_INSTANTIATOR_HPP

Modified: sandbox/SOC/2007/signals/boost/signal_network/base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/base.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -7,16 +7,46 @@
 #else
 #define SIGNAL_NETWORK_TRACKABLE
 #endif
-#include <boost/signal_network/detail/defines.hpp>
+#include <boost/function_types/member_function_pointer.hpp>
+#include <boost/function_types/parameter_types.hpp>
+#include <boost/function_types/result_type.hpp>
+
+#define SIGNAL_NETWORK_OPEN_SIGNAL_NETWORK_NAMESPACE namespace boost { namespace signal_network {
+#define SIGNAL_NETWORK_CLOSE_SIGNAL_NETWORK_NAMESPACE } }
+#define SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE namespace boost { namespace signal_network { namespace signet {
+#define SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE } } }
 
 // Constructs a type corresponding to pointer to member of T with signature Signature.
 // e.g. slot_type<some_class, void(float)>::type is void (some_class::*) (float)
 
-#define SIGNAL_NETWORK_TEMPLATE_CLASS slot_type
+/*#define SIGNAL_NETWORK_TEMPLATE_CLASS slot_type
 #define SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
 #define SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
 #define SIGNAL_NETWORK_TEMPLATE_DETAIL
-#include <boost/signal_network/detail/loader.hpp>
+#include <boost/signal_network/detail/loader.hpp>*/
+
+namespace boost {
+ namespace signal_network {
+ namespace signet {
+ namespace detail {
+
+template <typename T, typename Signature>
+struct slot_type
+{
+ typedef
+ typename boost::function_types::member_function_pointer<
+ typename boost::mpl::push_front<
+ typename boost::mpl::push_front<
+ typename boost::function_types::parameter_types<Signature>::type, T
+ >::type, typename boost::function_types::result_type<Signature>::type
+ >::type
+ >::type type;
+};
+
+ } // namespace detail
+ } // namespace signet
+ } // namespace signal_network
+} // namespace boost
 
 /// \namespace boost::signal_network \brief Connection operators
 /// \namespace boost::signal_network::signet \brief Signal Network components
@@ -35,9 +65,6 @@
 };
 
 /// Allows functions other than operator() to serve as signet::filter slots.
-/** \ingroup Utility
- \sa signet::filter for an \ref signet::filter_multi_in_example "example"
-*/
 template<typename Signature, typename T>
 slot_selector_t<T, Signature> slot_selector(T &link, typename signet::detail::slot_type<T, Signature>::type func)
 {
@@ -46,30 +73,25 @@
 
 SIGNAL_NETWORK_CLOSE_SIGNAL_NETWORK_NAMESPACE
 
-#define SIGNAL_NETWORK_TEMPLATE_CLASS connect
-#define SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
-#define SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS
-#include <boost/signal_network/detail/loader.hpp>
-
-#define SIGNAL_NETWORK_TEMPLATE_CLASS connect_slot
-#define SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
-#define SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS
-#include <boost/signal_network/detail/loader.hpp>
+#include <boost/signal_network/detail/connect.hpp>
+#include <boost/signal_network/detail/connect_slot.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
 namespace detail {
         
-template<typename T, typename Signature> void connect(boost::signal<Signature> &signal, T &link)
+template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare>
+ void connect(boost::signal<Signature, Combiner, Group, GroupCompare> &signal, T &link)
 {
- connect_impl<T, Signature, boost::function_traits<Signature>::arity>::connect(signal, link);
+ connect_impl<T, Signature, Combiner, Group, GroupCompare,boost::function_traits<Signature>::arity>
+ ::connect(signal, link);
 }
 
-template<typename T, typename Signature> void connect_slot(boost::signal<Signature> &signal, const slot_selector_t<T, Signature> &link)
+template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare>
+ void connect_slot(boost::signal<Signature> &signal, const slot_selector_t<T, Signature> &link)
 {
- connect_slot_impl<T, Signature, boost::function_traits<Signature>::arity>::connect_slot(signal, link);
+ connect_slot_impl<T, Signature, Combiner, Group, GroupCompare, boost::function_traits<Signature>::arity>
+ ::connect_slot(signal, link);
 }
 
 } // namespace detail
@@ -85,7 +107,7 @@
 SIGNAL_NETWORK_OPEN_SIGNAL_NETWORK_NAMESPACE
 
 /// Connects a sequence of components using signals.
-/** This operator is identical to signet::filter::operator>= (it connects the
+/** This operator is identical to signet::filter::operator| (it connects the
 left component to the right component, and returns a reference to the left component),
 except it is evaluated right to left. This makes it semantics more suitable for
 connecting a chain of connections.
@@ -118,11 +140,11 @@
 typename boost::enable_if<boost::is_base_of<signet::filter_base, Filter>, Filter & >::type
 operator | (Filter &filter, slot_selector_t<T, Signature> link) {signet::detail::connect_slot(filter.default_signal(), link); return filter;}
 
-template<typename Signature, typename T>
+template<typename Signature, typename Combiner, typename Group, typename GroupCompare, typename T>
 boost::signal<Signature> &operator >>= (boost::signal<Signature> &signal, T &link)
 {signet::detail::connect(signal, link); return signal;}
 
-template<typename Signature, typename T>
+template<typename Signature, typename Combiner, typename Group, typename GroupCompare, typename T>
 boost::signal<Signature> &operator >= (boost::signal<Signature> &signal, T &link)
 {signet::detail::connect(signal, link); return signal;}
 

Modified: sandbox/SOC/2007/signals/boost/signal_network/chain.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/chain.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/chain.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -13,56 +13,66 @@
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
+/** \brief Connects a number of components of the same type in a chain.
+\param T Type of the component.
+\param Signature Signature of the signal sent and received.
+
+*/
 template<typename T, typename Signature>
 class chain : public filter_base
 {
 public:
     typedef boost::function_types::parameter_types<Signature> parameter_types;
+
     typedef typename boost::fusion::result_of::as_vector<parameter_types >::type parameter_vector;
 
     typedef boost::fusion::unfused_inherited<chain<T, Signature>,
         typename mpl::vector<size_t, T *>::type,
         typename boost::function_types::parameter_types<Signature> > unfused;
 
- chain(size_t copies, T *component=NULL)
- {
- initialize(copies, component);
- }
- ~chain()
- {
- delete[] components;
- }
- template <class Seq>
- struct result
- {
- typedef typename boost::function_traits<Signature>::result_type type;
- };
- typename boost::function_traits<Signature>::result_type
+ /// Constructs a chain composed of instances of T.
+ /// Constructs a chain composed of copies of component.
+ chain(size_t copies, T *component=NULL)
+ {
+ initialize(copies, component);
+ }
+ ~chain()
+ {
+ delete[] components;
+ }
+ template <class Seq>
+ struct result
+ {
+ typedef typename boost::function_traits<Signature>::result_type type;
+ };
+ /// Sending a signal to the chain will forward it to the first component in the chain.
+ typename boost::function_traits<Signature>::result_type
     operator()(const parameter_vector &vec_par)
     {
         return boost::fusion::fused<T &>(components[0])(vec_par);
- }
- boost::signal<Signature> &default_signal()
+ }
+ /// The default signal coming out of the chain is the default signal of the last component in the chain.
+ typename T::signal_type &default_signal()
         {
                 return components[size-1].default_signal();
- }
-private:
- void initialize(size_t copies, T *component=NULL)
- {
- size = copies;
- components = new T[copies];
- for (size_t i=0; i<copies-1; i++)
- {
- if (component) components[i] = *component;
- components[i] >>= components[i+1];
- }
- if (component) components[size-1] = *component;
- }
- T *components;
- size_t size;
-
-};
-
+ }
+private:
+ void initialize(size_t copies, T *component=NULL)
+ {
+ size = copies;
+ components = new T[copies];
+ for (size_t i=0; i<copies-1; i++)
+ {
+ if (component) components[i] = *component;
+ components[i] >>= components[i+1];
+ }
+ if (component) components[size-1] = *component;
+ }
+ T *components;
+ size_t size;
+
+};
+
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
-
+
 #endif // SIGNAL_NETWORK_CHAIN_HPP

Added: sandbox/SOC/2007/signals/boost/signal_network/conditional.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/conditional.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,68 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef SIGNAL_NETWORK_CONDITIONAL_HPP
+#define SIGNAL_NETWORK_CONDITIONAL_HPP
+
+#include <boost/signal_network/filter.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/function_types/result_type.hpp>
+#include <boost/signal_network/detail/unfused_inherited.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+/** \brief Forwards an incoming signal if an specified condition evaluates to true.
+*/
+template<
+typename Condition,
+typename Member,
+typename Signature,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group> >
+class conditional : public filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare>
+{
+ typedef filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare> base_type;
+
+public:
+ typedef boost::fusion::unfused_inherited<conditional<Condition, Member, Signature, OutSignal, Combiner, Group, GroupCompare>,
+ typename mpl::vector<>::type,
+ typename boost::function_types::parameter_types<Signature> > unfused;
+
+ template <class Seq>
+ struct result : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+ typename base_type::signal_type::result_type> {};
+
+ /** Forwards the signal if the condition evaluates the true.
+ \returns Return value of the sent signal if the condition evaluates to true,
+ default constructed instance otherwise.
+ */
+ template <class Seq>
+#ifndef DOXYGEN_DOCS_ONLY
+ typename boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+#endif
+ typename base_type::signal_type::result_type
+#ifndef DOXYGEN_DOCS_ONLY
+ >::type
+#endif
+ operator()(const Seq &vec_par)
+ {
+ if (Condition()(member))
+ return fused_out(vec_par);
+ else
+ return typename base_type::signal_type::result_type();
+ }
+protected:
+ Member member;
+};
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+#endif // SIGNAL_NETWORK_CONDITIONAL_HPP
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/signal_network/counter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/counter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/counter.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -6,38 +6,54 @@
 #ifndef SIGNAL_NETWORK_COUNTER_HPP
 #define SIGNAL_NETWORK_COUNTER_HPP
 
-#include <boost/signal_network/detail/defines.hpp>
-#include <boost/signal_network/detail/unfused_inherited.hpp>
-#include <boost/signal_network/filter.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/signal_network/applicator.hpp>
+#include <boost/type_traits/remove_volatile.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
-template<typename Signature, typename T=int>
-class counter : public fused_filter<Signature>
-{
-public:
- typedef boost::fusion::unfused_inherited<counter<Signature, T>,
- typename mpl::vector<>::type,
- typename boost::function_types::parameter_types<Signature> > unfused;
-
- counter() : count_(0) {}
- template <class Seq>
- struct result
- {
- typedef typename boost::function_traits<Signature>::result_type type;
- };
- typename boost::function_traits<Signature>::result_type
- operator()(const typename fused_filter<Signature>::parameter_vector &vec_par)
+namespace detail
+{
+ template<typename T>
+ struct postincrement
     {
- count_++;
- return static_cast<typename boost::function_traits<Signature>::result_type>
- (fused_out(vec_par));
- }
- T count() {return count_;}
-private:
- T count_;
+ void operator()(T &t)
+ {
+ t++;
+ }
+ };
+}
+/** \brief Counts the number of signals passing through the component.
+ counter is an applicator with a postincrement application and default member of type volatile int.
+ \param T Type of the internal counter variable.
+*/
+template<typename Signature,
+typename T=volatile int,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group>,
+typename Base = applicator<detail::postincrement<T>, T, Signature, OutSignal, Combiner, Group, GroupCompare> >
+class counter : public Base
+{
+public:
+ typedef counter<Signature, T, OutSignal, Combiner, Group, GroupCompare,
+ typename applicator<detail::postincrement<T>, T, Signature, OutSignal, Combiner, Group, GroupCompare>::unfused >
+ unfused;
+
+ /** Initializes the internal counter to 0.
+ */
+ counter()
+ { reset(); }
+
+ /** Sets the internal counter to 0.
+ */
+ void reset()
+ { Base::member = 0; }
+
+ /** \return The internal signal counter.
+ */
+ typename boost::remove_volatile<T>::type count() const
+ { return Base::member; }
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Added: sandbox/SOC/2007/signals/boost/signal_network/detail/connect.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/detail/connect.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,42 @@
+#if !defined(SIGNAL_NETWORK_CONNECT_HPP)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/enum_shifted_params.hpp>
+#include <boost/bind.hpp>
+
+#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename T,
+#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST T,
+
+namespace boost {
+ namespace signal_network {
+ namespace signet {
+ namespace detail {
+
+ template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare, int Arity>
+ struct connect_impl;
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,3,<boost/signal_network/detail/connect.hpp>))
+#include BOOST_PP_ITERATE()
+
+ } // namespace detail
+ } // namespace signet
+ } // namespace signal_network
+} // namespace boost
+
+#define SIGNAL_NETWORK_CONNECT_HPP
+#else // defined(BOOST_PP_IS_ITERATING)
+
+template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare>
+struct connect_impl<T, Signature, Combiner, Group, GroupCompare, BOOST_PP_ITERATION()>
+{
+ static void connect(boost::signal<Signature, Combiner, Group, GroupCompare> &signal, T &link)
+ {
+ signal.connect(boost::bind
+ (static_cast<typename slot_type<T, Signature>::type>( &T::operator() ),
+ boost::ref(link) BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(BOOST_PP_ITERATION()),_)));
+ }
+};
+#endif
+#endif
\ No newline at end of file

Added: sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,40 @@
+#if !defined(SIGNAL_NETWORK_CONNECT_SLOT_HPP)
+#if !defined(BOOST_PP_IS_ITERATING)
+
+#include <boost/preprocessor/iterate.hpp>
+
+#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename T,
+#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST T,
+
+namespace boost {
+ namespace signal_network {
+ namespace signet {
+ namespace detail {
+
+ template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare, int Arity>
+ struct connect_slot_impl;
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,3,<boost/signal_network/detail/connect.hpp>))
+#include BOOST_PP_ITERATE()
+
+ } // namespace detail
+ } // namespace signet
+ } // namespace signal_network
+} // namespace boost
+
+#define SIGNAL_NETWORK_CONNECT_SLOT_HPP
+#else // defined(BOOST_PP_IS_ITERATING)
+
+template<typename T, typename Signature, typename Combiner, typename Group, typename GroupCompare>
+struct connect_impl<T, Signature, Combiner, Group, GroupCompare, BOOST_PP_ITERATION()>
+{
+ static void connect_slot(boost::signal<Signature, Combiner, Group, GroupCompare> &signal, const slot_selector_t<T, Signature> &slot)
+ {
+ signal.connect(boost::bind
+ (static_cast<typename slot_type<T, Signature>::type>(slot.func),
+ boost::ref(slot.link) BOOST_PP_COMMA_IF(BOOST_PP_ITERATION())
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(BOOST_PP_ITERATION()),_)));
+ }
+};
+#endif
+#endif
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/detail/connect_slot_template.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,10 +1,10 @@
-#ifndef SIGNAL_NETWORK_TEMPLATE_BODY
+#ifndef SIGNAL_NETWORK_TEMPLATE_BODY
                 static void connect_slot(boost::signal<Signature> &signal, const slot_selector_t<T, Signature> &slot)
                 {
                         signal.connect(boost::bind(
                         (typename slot_type<T, Signature>::type) slot.func,
                                 boost::ref(slot.link) SIGNAL_NETWORK_BIND_ARGS(SIGNAL_NETWORK_TEMPLATE_ARITY)));
                 }
-#else
-
+#else
+
 #endif

Modified: sandbox/SOC/2007/signals/boost/signal_network/detail/connect_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/connect_template.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/detail/connect_template.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,10 +1,10 @@
-#ifndef SIGNAL_NETWORK_TEMPLATE_BODY
+#ifndef SIGNAL_NETWORK_TEMPLATE_BODY
                 static void connect(boost::signal<Signature> &signal, T &link)
                 {
                         signal.connect(boost::bind(
                         static_cast<typename slot_type<T, Signature>::type>( &T::operator() ),
                                 boost::ref(link) SIGNAL_NETWORK_BIND_ARGS(SIGNAL_NETWORK_TEMPLATE_ARITY)));
                 }
-#else
-
+#else
+
 #endif

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/defines.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/defines.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,52 +0,0 @@
-// signal_defines.hpp
-
-// Copyright Stjepan Rajko 2007. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef AME_SIGNAL_DEFINES_HPP
-#define AME_SIGNAL_DEFINES_HPP
-
-#include <boost/preprocessor/punctuation/comma.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
-#include <boost/preprocessor/repetition/enum_shifted.hpp>
-
-#define SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE namespace boost { namespace signal_network { namespace signet {
-#define SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE } } }
-
-#define SIGNAL_NETWORK_OPEN_SIGNAL_NETWORK_NAMESPACE namespace boost { namespace signal_network {
-#define SIGNAL_NETWORK_CLOSE_SIGNAL_NETWORK_NAMESPACE } }
-
-
-// generates a list of arguments with names and types
-// e.g. SIGNAL_NETWORK_ARG_TYPENAMES(2) evaluates to:
-// typename boost::function_traits<Signature>::arg1_type arg1, typename boost::function_traits<Signature>::arg2_type arg2
-#define SIGNAL_NETWORK_ARG_TYPENAME(z,n,text) typename boost::function_traits<Signature>::arg##n##_type arg##n
-#define SIGNAL_NETWORK_ARG_TYPENAME_COMMA(z,n,text) SIGNAL_NETWORK_ARG_TYPENAME(z,n,text) BOOST_PP_COMMA()
-#define SIGNAL_NETWORK_ARG_TYPENAMES(n) BOOST_PP_REPEAT_FROM_TO(1,n,SIGNAL_NETWORK_ARG_TYPENAME_COMMA,_) BOOST_PP_IF(n,SIGNAL_NETWORK_ARG_TYPENAME(n,n,_),BOOST_PP_EMPTY())
-#define SIGNAL_NETWORK_ARG_TYPENAMES_INC(n) BOOST_PP_EXPAND(BOOST_PP_ENUM_SHIFTED(n,SIGNAL_NETWORK_ARG_TYPENAME,_))
-
-// generates a list of arguments with names only
-// e.g. SIGNAL_NETWORK_ARG_NAMES(2) evaluates to:
-// arg1, arg2
-#define SIGNAL_NETWORK_ARG_NAMES(n) BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(n), arg)
-
-// generates a list of arguments with types only
-// e.g. SIGNAL_NETWORK_ARG_TYPES(2) evaluates to:
-// typename boost::function_traits<Signature>::arg1_type, typename boost::function_traits<Signature>::arg2_type
-#define SIGNAL_NETWORK_ARG_TYPE(n) typename boost::function_traits<Signature>::arg##n##_type
-#define SIGNAL_NETWORK_ARG_TYPE_COMMA(z,n,text) SIGNAL_NETWORK_ARG_TYPE(n) BOOST_PP_COMMA()
-#define SIGNAL_NETWORK_ARG_TYPES(n) BOOST_PP_REPEAT_FROM_TO(1,n,SIGNAL_NETWORK_ARG_TYPE_COMMA,_) BOOST_PP_IF(n,SIGNAL_NETWORK_ARG_TYPE(n),BOOST_PP_EMPTY())
-
-#define SIGNAL_NETWORK_FUNCTION(_name,_signature,_arity) typename boost::function_traits<_signature>::result_type _name (SIGNAL_NETWORK_ARG_TYPENAMES(_arity))
-#define SIGNAL_NETWORK_DEFAULT_SLOT operator()
-
-// generates a list of bound aruments
-// e.g. SIGNAL_NETWORK_BIND_ARGS(2) evaluates to ,_1, _2
-#define SIGNAL_NETWORK_BIND_ARGS(n) BOOST_PP_IF(n,BOOST_PP_COMMA,BOOST_PP_EMPTY)() BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(n),_)
-
-#define SIGNAL_NETWORK_RETURN(_return) BOOST_PP_IF(_return,return,BOOST_PP_EMPTY())
-
-#endif
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/loader.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/loader.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,109 +0,0 @@
-#include <boost/preprocessor/iterate.hpp>
-
-#define SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL BOOST_PP_CAT(SIGNAL_NETWORK_TEMPLATE_CLASS,_impl)
-#define SIGNAL_NETWORK_TEMPLATE_FILE_TO_INCLUDE <boost/signal_network/detail/BOOST_PP_CAT(SIGNAL_NETWORK_TEMPLATE_CLASS,_template.hpp>)
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE2
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS int Input,
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS_LIST Input,
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS_VALUES _inputs,
-#else
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS_LIST
-#define SIGNAL_NETWORK_TEMPLATE_INPUTS_VALUES
-#endif // SIGNAL_NETWORK_ITERATE2
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename T,
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST T,
-#else
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES
-#define SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST
-#endif // SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_BASE
-#define SIGNAL_NETWORK_TEMPLATE_INHERIT : public SIGNAL_NETWORK_TEMPLATE_BASE
-#else
-#define SIGNAL_NETWORK_TEMPLATE_BASE
-#define SIGNAL_NETWORK_TEMPLATE_INHERIT
-#endif // SIGNAL_NETWORK_TEMPLATE_INHERIT_FILTER
-
-namespace boost {
-namespace signal_network {
-namespace signet {
-namespace detail {
-
-template<SIGNAL_NETWORK_TEMPLATE_INPUTS SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename Signature, int Arity
-#ifndef SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
- , typename Enable=void
-#endif // SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
->
-struct SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL;
-
-} // namespace detail
-} // namespace signet
-} // namespace signal_network
-} // namespace boost
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE2
-#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,3,<boost/signal_network/detail/template_loader2.hpp>))
-#else
-#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,3,<boost/signal_network/detail/template_loader.hpp>))
-#endif // SIGNAL_NETWORK_TEMPLATE_ITERATE2
-#include BOOST_PP_ITERATE()
-#undef BOOST_PP_ITERATION_PARAMS_1
-
-#ifndef SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS
-
-#define SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_BASE detail::SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL \
- <SIGNAL_NETWORK_TEMPLATE_INPUTS_LIST SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST Signature, boost::function_traits<Signature>::arity>
-
-namespace boost {
-namespace signal_network {
-namespace signet {
-#ifdef SIGNAL_NETWORK_TEMPLATE_DETAIL
-namespace detail {
-#endif // SIGNAL_NETWORK_TEMPLATE_DETAIL
-
-template<SIGNAL_NETWORK_TEMPLATE_INPUTS SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename Signature
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-, typename Enable = void
-#endif
->
-class SIGNAL_NETWORK_TEMPLATE_CLASS;
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-#define BOOST_PP_ITERATION_PARAMS_1 (3,(0,3,<boost/signal_network/detail/main_class_loader.hpp>))
-#include BOOST_PP_ITERATE()
-#undef BOOST_PP_ITERATION_PARAMS_1
-#else
-#include <boost/signal_network/detail/main_class_loader.hpp>
-#endif
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_DETAIL
-} // detail
-#endif
-} // namespace signet
-} // namespace signal_network
-} // namespace boost
-
-#undef SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_BASE
-
-#endif // SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS
-
-#undef SIGNAL_NETWORK_TEMPLATE_ITERATE2
-#undef SIGNAL_NETWORK_TEMPLATE_INPUTS
-#undef SIGNAL_NETWORK_TEMPLATE_INPUTS_LIST
-#undef SIGNAL_NETWORK_TEMPLATE_INPUTS_VALUES
-#undef SIGNAL_NETWORK_TEMPLATE_DETAIL
-#undef SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS
-#undef SIGNAL_NETWORK_TEMPLATE_TYPENAME_T
-#undef SIGNAL_NETWORK_TEMPLATE_TYPENAMES
-#undef SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST
-#undef SIGNAL_NETWORK_TEMPLATE_INHERIT
-#undef SIGNAL_NETWORK_TEMPLATE_BASE
-#undef SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
-#undef SIGNAL_NETWORK_TEMPLATE_FILE_TO_INCLUDE
-#undef SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL
-#undef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-#undef SIGNAL_NETWORK_TEMPLATE_CLASS

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/main_class_loader.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/main_class_loader.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,22 +0,0 @@
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-#define SIGNAL_NETWORK_TEMPLATE_ARITY BOOST_PP_ITERATION()
-#define SIGNAL_NETWORK_TEMPLATE_ARITY_INC BOOST_PP_INC(SIGNAL_NETWORK_TEMPLATE_ARITY)
-#endif
-
-template<SIGNAL_NETWORK_TEMPLATE_INPUTS SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename Signature>
-class SIGNAL_NETWORK_TEMPLATE_CLASS
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-<SIGNAL_NETWORK_TEMPLATE_INPUTS SIGNAL_NETWORK_TEMPLATE_TYPENAMES Signature,
- typename enable_if_c<boost::function_traits<Signature>::arity==SIGNAL_NETWORK_TEMPLATE_ARITY>::type>
-#endif
- : public SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_BASE
-{
-#define SIGNAL_NETWORK_TEMPLATE_BODY
-#include SIGNAL_NETWORK_TEMPLATE_FILE_TO_INCLUDE
-#undef SIGNAL_NETWORK_TEMPLATE_BODY
-};
-
-#ifdef SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS
-#undef SIGNAL_NETWORK_TEMPLATE_ARITY
-#undef SIGNAL_NETWORK_TEMPLATE_ARITY_INC
-#endif

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/slot_type_template.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/slot_type_template.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,5 +0,0 @@
-#ifndef SIGNAL_NETWORK_TEMPLATE_BODY
- typedef typename boost::function_traits<Signature>::result_type (T::*type)(SIGNAL_NETWORK_ARG_TYPES(SIGNAL_NETWORK_TEMPLATE_ARITY));
-#else
-
-#endif

Added: sandbox/SOC/2007/signals/boost/signal_network/detail/storable.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/detail/storable.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,35 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef SIGNAL_NETWORK_STORABLE_HPP
+#define SIGNAL_NETWORK_STORABLE_HPP
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/mpl/transform.hpp>
+#include <boost/signal_network/base.hpp>
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+namespace detail
+{
+ /// Converts a type into a storable type by removing const qualifiers and references.
+ template<typename T>
+ struct storable : public boost::remove_const<typename boost::remove_reference<T>::type > {};
+
+ template<typename T>
+ struct mpl_storable
+ {
+ typedef typename boost::mpl::transform<
+ typename boost::mpl::transform<T,
+ boost::remove_reference<boost::mpl::_> >::type,
+ boost::remove_const<boost::mpl::_> >::type type;
+ };
+
+}
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+#endif // SIGNAL_NETWORK_STORABLE_HPP
\ No newline at end of file

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,57 +0,0 @@
-#if !defined(BOOST_PP_IS_ITERATING)
-# error Signal Network - do not include this file!
-#endif
-
-#include <boost/preprocessor/arithmetic/inc.hpp>
-
-#define SIGNAL_NETWORK_TEMPLATE_ARITY BOOST_PP_ITERATION()
-#define SIGNAL_NETWORK_TEMPLATE_ARITY_INC BOOST_PP_INC(SIGNAL_NETWORK_TEMPLATE_ARITY)
-
-namespace boost {
-namespace signal_network {
-namespace signet {
-namespace detail {
-
-#ifndef SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
-#define SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_DECLARATION(_return) \
- SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL<SIGNAL_NETWORK_TEMPLATE_INPUTS_VALUES SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST Signature, SIGNAL_NETWORK_TEMPLATE_ARITY \
-,typename boost::BOOST_PP_IF(_return,disable_if,enable_if) \
-<boost::is_void<typename boost::function_traits<Signature>::result_type > >::type >
-#else
-#define SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_DECLARATION(_return) \
- SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL<SIGNAL_NETWORK_TEMPLATE_INPUTS_VALUES SIGNAL_NETWORK_TEMPLATE_TYPENAMES_LIST Signature, SIGNAL_NETWORK_TEMPLATE_ARITY>
-#endif
-
-#define _return 0
-
-template<SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename Signature>
-struct SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_DECLARATION(_return)
-SIGNAL_NETWORK_TEMPLATE_INHERIT
- {
-#include SIGNAL_NETWORK_TEMPLATE_FILE_TO_INCLUDE
- };
-
-#undef _return
-
-
-#ifndef SIGNAL_NETWORK_TEMPLATE_NO_RETURNS
-#define _return 1
-
-template<SIGNAL_NETWORK_TEMPLATE_TYPENAMES typename Signature>
-struct SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_DECLARATION(_return)
-SIGNAL_NETWORK_TEMPLATE_INHERIT
- {
-#include SIGNAL_NETWORK_TEMPLATE_FILE_TO_INCLUDE
- };
-
-#undef _return
-#endif
-
-} // end namespace detail
-}
-}
-}
-
-#undef SIGNAL_NETWORK_TEMPLATE_CLASS_IMPL_DECLARATION
-#undef SIGNAL_NETWORK_TEMPLATE_ARITY
-#undef SIGNAL_NETWORK_TEMPLATE_ARITY_INC

Deleted: sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader2.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/detail/template_loader2.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
+++ (empty file)
@@ -1,19 +0,0 @@
-#if !defined(BOOST_PP_IS_ITERATING)
-# error Signal Network - do not include this file!
-#endif
-
-#define _inputs 2
-#define _inputs_inc 3
-
-#include <boost/signal_network/detail/template_loader.hpp>
-
-#undef _inputs_inc
-#undef _inputs
-
-#define _inputs 3
-#define _inputs_inc 4
-
-#include <boost/signal_network/detail/template_loader.hpp>
-
-#undef _inputs_inc
-#undef _inputs

Modified: sandbox/SOC/2007/signals/boost/signal_network/filter.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/filter.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/filter.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -12,32 +12,61 @@
 #include <boost/signal_network/base.hpp>
 #include <boost/type_traits/is_base_of.hpp>
 #include <boost/fusion/functional/adapter/fused.hpp>
-#include <boost/fusion/sequence/conversion/as_vector.hpp>
+#include <boost/fusion/sequence/conversion/as_vector.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
 /// Provides a basis for filters (components that receive and send a signal).
 /** \param Signature The signature of the signal being sent out.
 
- Use this class as a base class for classes that produce a \e signal
- of a particular signature.
+ Use this class as a base class for classes that produce a signal
+ of a particular signature.
+*/
+struct combined_out_signal
+{
+ typedef combined_out_signal default_normal_type;
+ typedef combined_out_signal default_unfused_type;
+};
+struct unfused_out_signal
+{
+ typedef combined_out_signal default_normal_type;
+ typedef combined_out_signal default_unfused_type;
+};
+struct fused_out_signal
+{
+ typedef fused_out_signal default_normal_type;
+ typedef fused_out_signal default_unfused_type;
+};
+
+struct default_out_signal
+{
+ typedef fused_out_signal default_normal_type;
+ typedef combined_out_signal default_unfused_type;
+};
+
+template<typename Signature,
+typename OutSignal=unfused_out_signal,
+typename Combiner = boost::last_value<typename boost::function_traits<Signature>::result_type>,
+typename Group = int,
+typename GroupCompare = std::less<Group>
+>
+class filter;
 
- \par Example:
- \dontinclude example.cpp
- \skip DoublerClass
- \until end void filter_test
+/** \brief Unfused version of the filter class
 */
-template<typename Signature>
-class filter : public filter_base
+template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
+class filter<Signature, unfused_out_signal, Combiner, Group, GroupCompare> : public filter_base
 {
 public:
+ // the signature of the output signal
         typedef Signature signature_type;
- typedef boost::signal<Signature> signal_type;
- typedef typename boost::function_traits<Signature>::result_type result_type;
+ // the type of the signal
+ typedef boost::signal<Signature, Combiner, Group, GroupCompare> signal_type;
 
         filter(const filter &) {}
- filter &operator = (const filter &) {return *this;}
         filter(){}
+ const filter &operator = (const filter &) {return *this;}
+
         /// Returns the default out signal.
         signal_type &default_signal()
         { return out; }
@@ -47,17 +76,53 @@
         signal_type out;
 }; // class filter
 
-template<typename Signature>
-class fused_filter : public filter<Signature>
+/** \brief Combined version of the filter class
+*/
+template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
+class filter<Signature, combined_out_signal, Combiner, Group, GroupCompare>
+: public filter<Signature, unfused_out_signal, Combiner, Group, GroupCompare>
 {
+ typedef filter<Signature, unfused_out_signal, Combiner, Group, GroupCompare> base_type;
 public:
- fused_filter() : fused_out(filter<Signature>::out) {}
+ filter() : fused_out(base_type::out) {}
+
+ typedef typename base_type::signature_type signature_type;
+ typedef typename base_type::signal_type signal_type;
+
+ typedef typename boost::function_types::parameter_types<Signature>::type parameter_types;
+ typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
+ typedef typename signal_type::result_type fused_signature_type (const parameter_vector &);
 
 protected:
- typedef boost::function_types::parameter_types<Signature> parameter_types;
- typedef typename boost::fusion::result_of::as_vector<parameter_types >::type parameter_vector;
+ boost::signal<fused_signature_type, Combiner, Group, GroupCompare> fusion_out;
+ boost::fusion::fused<typename base_type::signal_type const &> fused_out;
+}; // class filter
 
- boost::fusion::fused<typename filter<Signature>::signal_type const &> fused_out;
+/** \brief Fused version of the filter class
+*/
+template<typename Signature, typename Combiner, typename Group, typename GroupCompare>
+class filter<Signature, fused_out_signal, Combiner, Group, GroupCompare>
+: public filter_base
+{
+public:
+ filter(const filter &) {}
+ filter(){}
+ const filter &operator = (const filter &) {return *this;}
+
+ typedef typename boost::function_types::parameter_types<Signature>::type parameter_types;
+ typedef typename boost::fusion::result_of::as_vector<parameter_types>::type parameter_vector;
+ typedef typename Combiner::result_type signature_type (const parameter_vector &);
+ typedef typename Combiner::result_type fused_signature_type (const parameter_vector &);
+ typedef boost::signal<signature_type, Combiner, Group, GroupCompare> signal_type;
+
+ /// Returns the default out signal.
+ signal_type &default_signal()
+ { return fused_out; }
+ /// Disconnects all slots connected to the signet::filter.
+ void disconnect_all_slots() {fused_out.disconnect_all_slots();}
+
+protected:
+ signal_type fused_out;
 }; // class filter
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Modified: sandbox/SOC/2007/signals/boost/signal_network/function.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/function.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/function.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -8,39 +8,55 @@
 #ifndef SIGNAL_NETWORK_FUNCTION_HPP
 #define SIGNAL_NETWORK_FUNCTION_HPP
 
-#include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/detail/defines.hpp>
+#include <boost/signal_network/modifier.hpp>
 #include <boost/function.hpp>
-#include <boost/signal_network/detail/unfused_inherited.hpp>
-#include <boost/mpl/vector.hpp>
-
+#include <boost/signal_network/storage.hpp>
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
-template<typename Signature>
-class function : public filter<void (typename boost::function_traits<Signature>::result_type)>
+namespace detail
 {
- typedef boost::function_types::parameter_types<Signature> ParTypes;
-public:
- typedef boost::fusion::unfused_inherited<function<Signature>,
- typename mpl::vector<boost::function<Signature> >::type,
- typename boost::function_types::parameter_types<Signature> > unfused;
-
- function(boost::function<Signature> f) :
- func(f),
- fused_func(boost::fusion::fused<boost::function<Signature> const &>(func)) {}
- template <class Seq>
- struct result
- {
- typedef void type;
- };
- template <class Seq>
- void operator()(const Seq &vec_par)
+ template<typename FunctionSignature, typename Signature>
+ struct function_adapter
     {
- out(fused_func(vec_par));
- }
-protected:
- boost::function<Signature> func;
- boost::fusion::fused<boost::function<Signature> const &> fused_func;
+ function_adapter(const boost::function<FunctionSignature> &f) :
+ func(f),
+ fused_func(boost::fusion::fused<boost::function<FunctionSignature> const &>(func)) {}
+ function_adapter(const function_adapter &fa) :
+ func(fa.func),
+ fused_func(boost::fusion::fused<boost::function<FunctionSignature> const &>(func)) {}
+ template<typename Seq>
+ const typename storage<Signature>::storable_vector &
+ operator()(const Seq &seq)
+ {
+ boost::fusion::at_c<0>(vector) = fused_func(seq);
+ return vector;
+ }
+ protected:
+ typename storage<Signature>::storable_vector vector;
+ boost::function<FunctionSignature> func;
+ boost::fusion::fused<boost::function<FunctionSignature> const &> fused_func;
+ };
+}
+/** \brief Converts a function into a Signal Network filter.
+\param Signature Signature of the function to be converted.
+
+The signet::function object will receive signals of signature void(<i>function arguments</i>),
+and send signals of signature void(<i>function return type</i>).
+*/
+template<typename Signature,
+ typename FunctionSignature,
+ typename OutSignal=default_out_signal,
+ typename Combiner = boost::last_value<void>,
+ typename Group = int,
+ typename GroupCompare = std::less<Group>,
+ typename Base = modifier<detail::function_adapter<FunctionSignature, Signature>, Signature, OutSignal, Combiner, Group, GroupCompare>
+>
+class function : public Base
+{
+public:
+ typedef function<Signature, FunctionSignature, OutSignal, Combiner, Group, GroupCompare, typename Base::unfused > unfused;
+
+ function(const boost::function<FunctionSignature> &f) : Base(f) {}
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Added: sandbox/SOC/2007/signals/boost/signal_network/instantiator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/instantiator.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,66 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef SIGNAL_NETWORK_INSTANTIATOR_HPP
+#define SIGNAL_NETWORK_INSTANTIATOR_HPP
+
+#include <boost/signal_network/filter.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/signal_network/detail/unfused_inherited.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+/** \brief Generic component which, upon receiving a signal, instantiates an object of type Instantiation from a member object
+ of type Member.
+*/
+template<
+typename Instantiation,
+typename Member,
+typename Signature,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group> >
+class instantiator : public filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare>
+{
+ typedef filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare> base_type;
+
+public:
+#ifndef DOXYGEN_DOCS_ONLY
+ typedef boost::fusion::unfused_inherited<instantiator<Instantiation, Member, Signature,
+ typename OutSignal::default_unfused_type, Combiner, Group, GroupCompare>,
+ typename mpl::vector<>::type,
+ typename base_type::parameter_types > unfused;
+
+ template <class Seq>
+ struct result : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+ typename base_type::signal_type::result_type> {};
+#endif
+
+ /** Instantiates an instance of Instantiation from the Member object.
+ */
+ template <class Seq>
+#ifndef DOXYGEN_DOCS_ONLY
+ typename boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+#endif
+ typename base_type::signal_type::result_type
+#ifndef DOXYGEN_DOCS_ONLY
+ >::type
+#endif
+ operator()(const Seq &seq)
+ {
+ Instantiation instance(member);
+ return fused_out(seq);
+ }
+protected:
+ Member member;
+};
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+#endif // SIGNAL_NETWORK_INSTANTIATOR_HPP

Modified: sandbox/SOC/2007/signals/boost/signal_network/junction.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/junction.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/junction.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -6,43 +6,50 @@
 #ifndef SIGNAL_NETWORK_JUNCTION_HPP
 #define SIGNAL_NETWORK_JUNCTION_HPP
 
-#include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/detail/defines.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits.hpp>
-#include <boost/signal_network/detail/unfused_inherited.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/signal_network/conditional.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
-
-template<typename Signature>
-class junction : public fused_filter<Signature>
-{
-public:
- typedef boost::fusion::unfused_inherited<junction<Signature>,
- typename mpl::vector<>::type,
- typename boost::function_types::parameter_types<Signature> > unfused;
-
- junction() : enabled(true) {}
- void enable() {enabled = true;}
- void disable() {enabled = false;}
-
- template <class Seq>
- struct result
- {
- typedef typename boost::function_traits<Signature>::result_type type;
- };
-
- typename boost::function_traits<Signature>::result_type
- operator()(const typename fused_filter<Signature>::parameter_vector &vec_par)
+
+namespace detail
+{
+ template<typename T>
+ struct identity
+ {
+ T operator ()(T t) const
+ {
+ return t;
+ }
+ };
+}
+
+/** \brief Forwards a single signal to multiple slots, and can
+also be disabled to stop the flow of signals.
+ junction is a conditional with Condition identity and Member volatile bool
+*/
+template<typename Signature,
+ typename OutSignal=default_out_signal,
+ typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+ typename Group = int,
+ typename GroupCompare = std::less<Group>,
+ typename Base = conditional<detail::identity<bool>, volatile bool, Signature, OutSignal, Combiner, Group, GroupCompare>
+>
+class junction : public Base
+{
+public:
+ typedef junction<Signature, OutSignal, Combiner, Group, GroupCompare, typename Base::unfused > unfused;
+
+ /** Initializes the junction to be enabled.
+ */
+ junction(bool enabled=true)
     {
- if (enabled)
- return static_cast<typename boost::function_traits<Signature>::result_type>
- (fused_out(vec_par));
- }
-private:
- volatile bool enabled;
+ enable();
+ }
+ /** Enables the junction (signals will be forwarded).
+ */
+ void enable() {Base::member = true;}
+ /** Disables the junction (signals will not be forwarded).
+ */
+ void disable() {Base::member = false;}
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Added: sandbox/SOC/2007/signals/boost/signal_network/modifier.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/boost/signal_network/modifier.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,64 @@
+// Copyright Stjepan Rajko 2007. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef SIGNAL_NETWORK_MODIFIER_HPP
+#define SIGNAL_NETWORK_MODIFIER_HPP
+
+#include <boost/signal_network/filter.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/fusion/sequence/adapted/mpl.hpp>
+#include <boost/signal_network/detail/unfused_inherited.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+
+template<
+typename Modification,
+typename Signature,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group> >
+class modifier : public filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare>
+{
+ typedef filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare> base_type;
+
+public:
+#ifndef DOXYGEN_DOCS_ONLY
+ typedef boost::fusion::unfused_inherited<modifier<Modification, Signature,
+ typename OutSignal::default_unfused_type, Combiner, Group, GroupCompare>,
+ typename mpl::vector<const Modification &>::type,
+ typename base_type::parameter_types > unfused;
+
+ template <class Seq>
+ struct result : public boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+ typename base_type::signal_type::result_type> {};
+#endif
+ modifier() {}
+ modifier (const Modification &m) : modification(m) {}
+
+ /** Applies the Modification object to the received signal parameters.
+ */
+ template <class Seq>
+#ifndef DOXYGEN_DOCS_ONLY
+ typename boost::enable_if<boost::fusion::traits::is_sequence<Seq>,
+#endif
+ typename base_type::signal_type::result_type
+#ifndef DOXYGEN_DOCS_ONLY
+ >::type
+#endif
+ operator()(const Seq &seq)
+ {
+ return fused_out(modification(seq));
+ }
+protected:
+ Modification modification;
+};
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+#endif // SIGNAL_NETWORK_MODIFIER_HPP

Modified: sandbox/SOC/2007/signals/boost/signal_network/mutex.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/mutex.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/mutex.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,5 +1,3 @@
-// signal_mutex.hpp
-
 // Copyright Stjepan Rajko 2007. Use, modification and
 // distribution is subject to the Boost Software License, Version
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -8,37 +6,23 @@
 #ifndef SIGNAL_NETWORK_MUTEX_HPP
 #define SIGNAL_NETWORK_MUTEX_HPP
 
-#include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/detail/defines.hpp>
+#include <boost/signal_network/instantiator.hpp>
 #include <boost/thread/mutex.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/fusion/sequence/adapted/mpl.hpp>
-#include <boost/signal_network/detail/unfused_inherited.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
-template<typename Signature>
-class mutex : public fused_filter<Signature>
+/** \brief Ensures a component is processing only one signal at a time when using multiple threads.
+*/
+template<typename Signature,
+typename OutSignal=default_out_signal,
+typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+typename Group = int,
+typename GroupCompare = std::less<Group>,
+typename Base = instantiator<boost::mutex::scoped_lock, boost::mutex, Signature, OutSignal, Combiner, Group, GroupCompare> >
+class mutex : public Base
 {
 public:
- typedef boost::fusion::unfused_inherited<mutex<Signature>,
- typename mpl::vector<>::type,
- typename boost::function_types::parameter_types<Signature> > unfused;
-
- template <class Seq>
- struct result
- {
- typedef typename boost::function_traits<Signature>::result_type type;
- };
- typename boost::function_traits<Signature>::result_type
- operator()(const typename fused_filter<Signature>::parameter_vector &vec_par)
- {
- boost::mutex::scoped_lock lock(mutex_);
- return static_cast<typename boost::function_traits<Signature>::result_type>
- (fused_out(vec_par));
- }
- private:
- boost::mutex mutex_;
+ typedef mutex<Signature, OutSignal, Combiner, Group, GroupCompare, typename Base::unfused> unfused;
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Modified: sandbox/SOC/2007/signals/boost/signal_network/selector.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/selector.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/selector.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -12,25 +12,43 @@
 #include <boost/signal_network/detail/defines.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+/** \brief Allows selection of signals from multiple inputs.
+\param Signature Signature of the signal sent and received.
+\warning Since I can't get Doxygen to unravel the preprocessed definition of this
+class, the documentation was generated through a non-functioning class Doxygen could read.
+
+This can be used to determine which signal out of a group of signals
+will continue through the selector (the others will not be forwarded).
+
+\par Example:
+\dontinclude example.cpp
+\skip selector_test
+\until end void selector_test
+*/
+
 /*
 template<typename Signature>
 class selector : public fused_filter<Signature>
 {
         selector() : selected(0) {}
+
+ /// Selects the indicated input (if source is 0, no input will be selected).
         void select(int source) {selected = source;}
         
- template <class Seq>
- struct result
- {
- typedef typename boost::function_traits<Signature>::result_type type;
+ template <class Seq>
+ struct result
+ {
+ typedef typename boost::function_traits<Signature>::result_type type;
     };
- typename boost::function_traits<Signature>::result_type
+ /// If N is selected, the signal received at this slot will be forwared.
+ typename boost::function_traits<Signature>::result_type
     operator()(const VecPar &vec_par)
     {
- if (selected == n)
- return static_cast<typename boost::function_traits<Signature>::result_type>
- (fused_out(vec_par));
+ if (selected == n)
+ return static_cast<typename boost::function_traits<Signature>::result_type>
+ (fused_out(vec_par));
     }
+ /// Returns the slot selector for inputN.
     template<int N>
     slot_selector_t<selector<Signature>, Signature> slot()
         {return slot_selector<Signature>(*this, &selector_impl<_inputs, Signature, _arity>::input##n);}

Modified: sandbox/SOC/2007/signals/boost/signal_network/socket_receiver.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/socket_receiver.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/socket_receiver.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -18,16 +18,30 @@
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
-template<typename Signature>
-class socket_receiver : public storage<Signature>
+/** \brief Receives serializable signals through a Boost.Asio socket.
+\param Signature Signature of the signal sent (and received through the socket).
+\todo socket_sender only works for Signatures of return type void.
+
+*/
+template<typename Signature,
+ typename OutSignal=default_out_signal,
+ typename Combiner = boost::last_value<typename boost::function_types::result_type<Signature>::type>,
+ typename Group = int,
+ typename GroupCompare = std::less<Group> >
+class socket_receiver : public storage<Signature, OutSignal, Combiner, Group, GroupCompare>
 {
+ typedef storage<Signature, OutSignal, Combiner, Group, GroupCompare> base_type;
+
 public:
- typedef boost::fusion::unfused_typed_class<socket_receiver<Signature>,
- typename boost::function_types::parameter_types<Signature> > unfused;
+ typedef boost::fusion::unfused_typed_class<socket_receiver<Signature,
+ OutSignal, Combiner, Group, GroupCompare>,
+ typename base_type::base_type::parameter_types> unfused;
 
- socket_receiver(asio::ip::tcp::socket &socket) :
+ /// Initializes the socket_sender to use the provided socket.
+ socket_receiver(asio::ip::tcp::socket &socket) :
                 socket_(socket),
                 stream(std::ios::in | std::ios::out | std::ios::binary) {}
+ /// Sets the receiver to wait for a packet and send its contents via the signal.
         void operator()()
         {
                 int received_size = socket_.receive(asio::buffer(buffer, bufferSize));

Modified: sandbox/SOC/2007/signals/boost/signal_network/socket_sender.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/socket_sender.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/socket_sender.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -17,50 +17,56 @@
 #include <boost/signal_network/detail/serialize_fusion_vector.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
-
-template<typename Signature>
-class socket_sender
-{
-public:
+
+/** \brief Sends serializable signals through a Boost asio socket.
+\param Signature Signature of the signal received (and sent through the socket).
+\todo socket_sender only works for Signatures of return type void.
+*/
+template<typename Signature>
+class socket_sender
+{
+public:
     typedef boost::fusion::unfused_inherited<socket_sender<Signature>,
         typename mpl::vector<asio::ip::tcp::socket &>::type,
         typename boost::function_types::parameter_types<Signature> > unfused;
-
+
     typedef boost::function_types::parameter_types<Signature> ParTypes;
 
- socket_sender(asio::ip::tcp::socket & socket) :
- socket(& socket),
- stream(std::ios::in | std::ios::out | std::ios::binary)
- { }
+ /// Initializes the socket_sender to use the provided socket.
+ socket_sender(asio::ip::tcp::socket & socket) :
+ socket(& socket),
+ stream(std::ios::in | std::ios::out | std::ios::binary)
+ { }
     socket_sender() :
- socket(NULL),
+ socket(NULL),
                 stream(std::ios::in | std::ios::out | std::ios::binary)
     { }
- virtual ~socket_sender()
- {
+ virtual ~socket_sender()
+ {
     }
 
     template<class Seq>
- struct result
- {
- typedef void type;
+ struct result
+ {
+ typedef void type;
     };
+ /// Serializes each of the arguments and sends them in a single packet through the socket.
     template <class Seq>
     void operator()(const Seq &vec_par)
     {
         if (socket)
         {
- boost::archive::binary_oarchive archive (stream);
- archive & vec_par;
- boost::asio::write(*socket, asio::buffer(stream.str()),
- boost::asio::transfer_all());
- stream.str(empty_string);
- }
- }
-private:
- asio::ip::tcp::socket *socket;
- std::stringstream stream;
- std::string empty_string;
+ boost::archive::binary_oarchive archive (stream);
+ archive & vec_par;
+ boost::asio::write(*socket, asio::buffer(stream.str()),
+ boost::asio::transfer_all());
+ stream.str(empty_string);
+ }
+ }
+private:
+ asio::ip::tcp::socket *socket;
+ std::stringstream stream;
+ std::string empty_string;
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Modified: sandbox/SOC/2007/signals/boost/signal_network/storage.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/storage.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/storage.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,5 +1,3 @@
-// storage.hpp
-
 // Copyright Stjepan Rajko 2007. Use, modification and
 // distribution is subject to the Boost Software License, Version
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -8,92 +6,151 @@
 #ifndef SIGNAL_NETWORK_GENERATOR_HPP
 #define SIGNAL_NETWORK_GENERATOR_HPP
 
+#include <boost/signal_network/detail/storable.hpp>
 #include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/detail/defines.hpp>
 #include <boost/type_traits.hpp>
 #include <boost/call_traits.hpp>
 
 #include <boost/function_types/parameter_types.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/mpl/transform.hpp>
 #include <boost/fusion/sequence/intrinsic/at.hpp>
 #include <boost/fusion/sequence/adapted/mpl.hpp>
 #include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/same_traits.hpp>
+#include <boost/mpl/greater.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
 
 #include <boost/signal_network/detail/unfused_typed_class.hpp>
 
 SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
 
-namespace detail {
-
-/// Converts a type into a storable type by removing const qualifiers and references.
-template<typename T>
-struct storable : public boost::remove_const<typename boost::remove_reference<T>::type > {};
-
-}
-
-template<typename Signature>
-class storage : public boost::signal_network::signet::filter<Signature>
+/** \brief Stores and transmits arguments received from a signal.
+ \param Signature Signature of the signal sent.
+*/
+template<typename Signature,
+ typename OutSignal=default_out_signal,
+ typename Combiner = boost::last_value<typename boost::function_traits<Signature>::result_type>,
+ typename Group = int,
+ typename GroupCompare = std::less<Group> >
+ class storage : public filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare>
 {
+#ifndef DOXYGEN_DOCS_ONLY
+protected:
+ typedef filter<Signature, typename OutSignal::default_normal_type, Combiner, Group, GroupCompare> base_type;
+ typedef storage<Signature, OutSignal, Combiner, Group, GroupCompare> this_type;
 public:
- typedef boost::signal_network::signet::filter<Signature> base_type;
 
- typedef boost::function_types::parameter_types<Signature> ParTypes;
- typedef typename boost::mpl::transform<
- typename boost::mpl::transform<ParTypes, boost::remove_reference<boost::mpl::_> >::type,
- boost::remove_const<boost::mpl::_> >::type StorableTypes;
- typedef typename boost::fusion::result_of::as_vector<StorableTypes >::type VecStorable;
+ typedef typename detail::mpl_storable<typename base_type::parameter_types>::type storable_types;
+ typedef typename boost::fusion::result_of::as_vector<storable_types >::type storable_vector;
 
- typedef boost::fusion::unfused_typed_class<storage<Signature>,
- typename boost::function_types::parameter_types<Signature> > unfused;
-
- storage(const VecStorable &vec_par) : stored(vec_par), fused_out(filter<Signature>::out) {}
- storage() : fused_out(filter<Signature>::out) {}
-
- template<class Seq>
- struct result
- {
- typedef void type;
- };
-
- void operator()()
+ typedef
+ boost::fusion::unfused_typed_class<storage<
+ Signature, typename OutSignal::default_unfused_type, Combiner, Group, GroupCompare>,
+ typename base_type::parameter_types> unfused;
+#endif
+
+ /** Initializes the stored parameter values using the provided sequence.
+ \param[in] seq Sequence from which the stored parameter sequence is initialized from.
+ */
+ template<typename Seq>
+ storage(const Seq &seq) : stored(seq) {}
+ /** Initializes the stored parameter values using its default constructor.
+ */
+ storage() {}
+
+ /** Sends a signal containing the stored parameter values.
+ \return Return value of the sent signal.
+ */
+ typename base_type::signal_type::result_type operator()()
     {
- fused_out(stored);
+ return base_type::fused_out(stored);
     }
+ /** Sends a signal containing the stored parameter values.
+ \return Return value of the sent signal.
+ */
+ typename base_type::signal_type::result_type operator()(const boost::fusion::vector<> &)
+ {
+ return base_type::fused_out(stored);
+ }
+
+#ifndef DOXYGEN_DOCS_ONLY
+ template<class Seq>
+ struct result : public boost::enable_if<typename boost::mpl::and_<
+ boost::fusion::traits::is_sequence<Seq>,
+ boost::mpl::greater<boost::fusion::result_of::size<Seq>, boost::mpl::int_<0> > >::type
+ > {};
+#endif
+
+ /** Sets the stored parameter values using the provided sequence.
+ \param[in] seq Sequence to whose value the stored parameter sequence is assigned to.
+
+ <b>Note:</b> Enabled only for fusion sequences of size >= 1.
+ */
     template <class Seq>
- void operator()(const Seq &vec_par)
+#ifndef DOXYGEN_DOCS_ONLY
+ typename boost::enable_if<typename boost::mpl::and_<
+ boost::fusion::traits::is_sequence<Seq>,
+ boost::mpl::greater<boost::fusion::result_of::size<Seq>, boost::mpl::int_<0> > >::type
+ >::type
+#else
+ void
+#endif
+ operator()(const Seq &seq)
     {
- stored = vec_par;
+ stored = seq;
     }
- const VecStorable &value()
+
+ /** \return A reference to the fusion vector of stored parameter values.
+ */
+ const storable_vector &stored_vector()
     {
         return stored;
     }
+ /** \return The stored value of parameter N using an optimizing cast.
+ */
     template<int N>
- typename boost::fusion::result_of::at_c<VecStorable, N>::type value_()
+ typename boost::fusion::result_of::at_c<storable_vector, N>::type at()
     {
         return boost::fusion::at_c<N>(stored);
     }
+ /** \return The stored value of parameter N typed exactly as it appears in the Signature.
+ */
     template<int N>
- typename boost::mpl::at_c<ParTypes, N>::type value_exact()
+ typename boost::mpl::at_c<typename base_type::parameter_types, N>::type value_at()
     {
         return boost::fusion::at_c<N>(stored);
     }
+
+ /** \return The slot selector for the related at function.
+ */
     template<int N>
- slot_selector_t<storage<Signature>,// typename boost::call_traits<
- typename boost::mpl::at_c<ParTypes, N>::type ()
- >//::param_type ()>
- slot()
+ slot_selector_t
+#ifndef DOXYGEN_DOCS_ONLY
+ <this_type,
+ typename boost::fusion::result_of::at_c<storable_vector, N>::type ()>
+#endif
+ at_slot()
+ {
+ return boost::signal_network::slot_selector<
+ typename boost::fusion::result_of::at_c<storable_vector, N>::type ()>
+ (*this, &storage<Signature>::template at<N>);
+ }
+ /** \return The slot selector for the value_at function.
+ */
+ template<int N>
+ slot_selector_t
+#ifndef DOXYGEN_DOCS_ONLY
+ <this_type,
+ typename boost::mpl::at_c<typename base_type::parameter_types, N>::type ()>
+#endif
+ value_at_slot()
         {
- return boost::signal_network::slot_selector<//typename boost::call_traits<
- typename boost::mpl::at_c<ParTypes, N>::type ()>
- (*this, &storage<Signature>::template value_exact<N>);
+ return boost::signal_network::slot_selector<
+ typename boost::mpl::at_c<typename base_type::parameter_types, N>::type ()>
+ (*this, &storage<Signature>::template value_at<N>);
     }
-
 protected:
- VecStorable stored;
- boost::fusion::fused<typename base_type::signal_type const &> fused_out;
+ storable_vector stored;
 };
 
 SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE

Modified: sandbox/SOC/2007/signals/boost/signal_network/timed_generator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/signal_network/timed_generator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/signal_network/timed_generator.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,113 +1,108 @@
-#ifndef SIGNAL_NETWORK_TIMED_GENERATOR_HPP
-#define SIGNAL_NETWORK_TIMED_GENERATOR_HPP
-
-#include <boost/signal_network/storage.hpp>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/condition.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/thread/xtime.hpp>
-
-SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
-
-/** \brief Creates its own thread and periodically sends a signal with the stored value.
- \param Signature signature of the sent signal.
- \warning Since I can't get Doxygen to unravel the preprocessed definition of this
- class, the documentation was generated through a non-functioning class Doxygen could read.
-
- \par Example:
- \dontinclude example.cpp
- \skip mutex_test
- \until end void mutex_test
-
-*/
-template<class Signature>
-class timed_generator : public storage<Signature>::unfused
-{
-public:
- /// Default constructor. Starts the thread, but signals won't be sent until the enable() function is called.
- timed_generator() : terminating(false), enabled(false)
- {
- thread_object = new boost::thread(boost::bind(&timed_generator<Signature>::thread_function, boost::ref(*this)));
- }
- /// Sets the object to send the stored value at specified time intervals.
- /** \param[in] interval Sets the time interval (in seconds) at which the signal is sent.
- \param[in] signal_count The signal will be sent signal_count times, or indefinitelly if signal_count==0.
- */
- void enable(double interval, unsigned signal_count=0)
- {
- xinterval.sec = (boost::xtime::xtime_sec_t)interval;
- xinterval.nsec = boost::xtime::xtime_nsec_t((interval - xinterval.sec) / 0.000000001);
-
- boost::mutex::scoped_lock lock(mutex_);
- boost::xtime_get(&xt, boost::TIME_UTC);
- count = signal_count;
- enabled = true;
- cond.notify_all();
- };
- /// Stops the sending of signals and suspends the thread.
- void disable()
- {
- enabled = false;
- }
- /// Forces the thread to terminate.
- void join()
- {
- boost::mutex::scoped_lock lock(mutex_);
- cond.notify_all();
- terminating = true;
- cond.wait(lock);
- thread_object->join();
- }
- /// The thread should be joined by the time the destructor is called.
- ~timed_generator()
- {
- terminating = true;
- cond.notify_all();
- delete thread_object;
- }
-private:
- void thread_function()
- {
- while (!terminating)
- {
- {
- boost::mutex::scoped_lock lock(mutex_);
- if (!enabled)
- cond.wait(lock);
- }
- if (terminating) break;
-
- xt.sec += xinterval.sec;
- xt.nsec += xinterval.nsec;
- if (xt.nsec >= 1000000000)
- {
- xt.nsec -= 1000000000;
- xt.sec++;
- }
-
- boost::thread::sleep(xt);
-
- if (terminating) break;
- (*this)();
- if (count)
- if (--count==0)
- disable();
- }
- cond.notify_all();
- }
- /// Class mutex.
- boost::mutex mutex_;
- boost::condition cond;
- boost::xtime xinterval;
- volatile bool terminating;
- boost::xtime xt;
- int count;
-
- boost::thread *thread_object;
- volatile bool enabled;
-};
-
-SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
-
-
-#endif // SIGNAL_NETWORK_TIMED_GENERATOR_HPP
+#ifndef SIGNAL_NETWORK_TIMED_GENERATOR_HPP
+#define SIGNAL_NETWORK_TIMED_GENERATOR_HPP
+
+#include <boost/signal_network/storage.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/thread/condition.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/xtime.hpp>
+
+SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE
+
+/** \brief Creates its own thread and periodically sends a signal with the stored value.
+ \param Signature signature of the sent signal.
+*/
+template<class Signature,
+typename Base=storage<Signature> >
+class timed_generator : public storage<Signature>
+{
+public:
+ typedef timed_generator<Signature, typename Base::unfused> unfused;
+
+ /// Default constructor. Starts the thread, but signals won't be sent until the enable() function is called.
+ timed_generator() : terminating(false), enabled(false)
+ {
+ thread_object = new boost::thread(boost::bind(&timed_generator::thread_function, boost::ref(*this)));
+ }
+ /// Sets the object to send the stored value at specified time intervals.
+ /** \param[in] interval Sets the time interval (in seconds) at which the signal is sent.
+ \param[in] signal_count The signal will be sent signal_count times, or indefinitelly if signal_count==0.
+ */
+ void enable(double interval, unsigned signal_count=0)
+ {
+ xinterval.sec = (boost::xtime::xtime_sec_t)interval;
+ xinterval.nsec = boost::xtime::xtime_nsec_t((interval - xinterval.sec) / 0.000000001);
+
+ boost::mutex::scoped_lock lock(mutex_);
+ boost::xtime_get(&xt, boost::TIME_UTC);
+ count = signal_count;
+ enabled = true;
+ cond.notify_all();
+ };
+ /// Stops the sending of signals and suspends the thread.
+ void disable()
+ {
+ enabled = false;
+ }
+ /// Forces the thread to terminate.
+ void join()
+ {
+ boost::mutex::scoped_lock lock(mutex_);
+ cond.notify_all();
+ terminating = true;
+ cond.wait(lock);
+ thread_object->join();
+ }
+ /// The thread should be joined by the time the destructor is called.
+ ~timed_generator()
+ {
+ terminating = true;
+ cond.notify_all();
+ delete thread_object;
+ }
+private:
+ void thread_function()
+ {
+ while (!terminating)
+ {
+ {
+ boost::mutex::scoped_lock lock(mutex_);
+ if (!enabled)
+ cond.wait(lock);
+ }
+ if (terminating) break;
+
+ xt.sec += xinterval.sec;
+ xt.nsec += xinterval.nsec;
+ if (xt.nsec >= 1000000000)
+ {
+ xt.nsec -= 1000000000;
+ xt.sec++;
+ }
+
+ boost::thread::sleep(xt);
+
+ if (terminating) break;
+ (*this)();
+ if (count)
+ if (--count==0)
+ disable();
+ }
+ cond.notify_all();
+ }
+ /// Class mutex.
+ boost::mutex mutex_;
+ boost::condition cond;
+ boost::xtime xinterval;
+ volatile bool terminating;
+ boost::xtime xt;
+ int count;
+
+ boost::thread *thread_object;
+ volatile bool enabled;
+};
+
+SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE
+
+
+#endif // SIGNAL_NETWORK_TIMED_GENERATOR_HPP

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/Release/test.build/Script-080DD7660C1390D400EEB53D.sh
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/Release/test.build/Script-080DD7660C1390D400EEB53D.sh (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/Release/test.build/Script-080DD7660C1390D400EEB53D.sh 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,4 +1,4 @@
 #!/bin/sh
 # shell script goes here
-echo warning: $BUILD_VARIANTS
-bjam --v2 --toolset=darwin ../../test
+style=`echo $BUILD_STYLE | sed 'y/DR/dr/'`
+bjam --v2 --toolset=darwin ../../test $style

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/cdecls.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/decls.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/files.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/imports.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/pbxindex.header
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/refs.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/subclasses.pbxbtree
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/build/signal_network.build/signal_network.pbxindex/symbols0.pbxsymbols
==============================================================================
Binary files. No diff available.

Modified: sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/build/xcodeide/signal_network.xcodeproj/project.pbxproj 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -18,17 +18,61 @@
                         name = test;
                         productName = test;
                 };
- 08C675740C139E1300D85379 /* clean test */ = {
+ 08668C500C19A16F00ACB19A /* example */ = {
                         isa = PBXAggregateTarget;
- buildConfigurationList = 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "clean test" */;
+ buildConfigurationList = 08668C520C19A16F00ACB19A /* Build configuration list for PBXAggregateTarget "example" */;
+ buildPhases = (
+ 08668C510C19A16F00ACB19A /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = example;
+ productName = test;
+ };
+ 08C675740C139E1300D85379 /* test clean */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "test clean" */;
                         buildPhases = (
                                 08C675730C139E1300D85379 /* ShellScript */,
                         );
                         dependencies = (
                         );
- name = "clean test";
+ name = "test clean";
                         productName = "clean test";
                 };
+ 08F0836C0C1DF6DE00687E1B /* example clean */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08F0836E0C1DF6DE00687E1B /* Build configuration list for PBXAggregateTarget "example clean" */;
+ buildPhases = (
+ 08F0836D0C1DF6DE00687E1B /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "example clean";
+ productName = test;
+ };
+ 08F0FB080C19826400D0865B /* doc */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08F0FB090C19828200D0865B /* Build configuration list for PBXAggregateTarget "doc" */;
+ buildPhases = (
+ 08F0FB070C19826400D0865B /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = doc;
+ productName = doc;
+ };
+ 08FD5E6D0C1BA8BC00F00877 /* doc clean */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 08FD5E6F0C1BA8BC00F00877 /* Build configuration list for PBXAggregateTarget "doc clean" */;
+ buildPhases = (
+ 08FD5E6E0C1BA8BC00F00877 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = "doc clean";
+ productName = doc;
+ };
 /* End PBXAggregateTarget section */
 
 /* Begin PBXFileReference section */
@@ -37,13 +81,7 @@
                 080DD76E0C13912C00EEB53D /* counter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = counter.hpp; sourceTree = "<group>"; };
                 080DD7700C13912C00EEB53D /* connect_slot_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connect_slot_template.hpp; sourceTree = "<group>"; };
                 080DD7710C13912C00EEB53D /* connect_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = connect_template.hpp; sourceTree = "<group>"; };
- 080DD7720C13912C00EEB53D /* defines.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = defines.hpp; sourceTree = "<group>"; };
- 080DD7730C13912C00EEB53D /* loader.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = loader.hpp; sourceTree = "<group>"; };
- 080DD7740C13912C00EEB53D /* main_class_loader.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = main_class_loader.hpp; sourceTree = "<group>"; };
                 080DD7750C13912C00EEB53D /* serialize_fusion_vector.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = serialize_fusion_vector.hpp; sourceTree = "<group>"; };
- 080DD7760C13912C00EEB53D /* slot_type_template.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = slot_type_template.hpp; sourceTree = "<group>"; };
- 080DD7770C13912C00EEB53D /* template_loader.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = template_loader.hpp; sourceTree = "<group>"; };
- 080DD7780C13912C00EEB53D /* template_loader2.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = template_loader2.hpp; sourceTree = "<group>"; };
                 080DD7790C13912C00EEB53D /* unfused_inherited.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_inherited.hpp; sourceTree = "<group>"; };
                 080DD77A0C13912C00EEB53D /* unfused_typed_class.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = unfused_typed_class.hpp; sourceTree = "<group>"; };
                 080DD77B0C13912C00EEB53D /* filter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = filter.hpp; sourceTree = "<group>"; };
@@ -55,6 +93,9 @@
                 080DD7810C13912C00EEB53D /* socket_sender.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = socket_sender.hpp; sourceTree = "<group>"; };
                 080DD7820C13912C00EEB53D /* storage.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = storage.hpp; sourceTree = "<group>"; };
                 080DD7830C13912C00EEB53D /* timed_generator.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = timed_generator.hpp; sourceTree = "<group>"; };
+ 08668C4E0C19A16300ACB19A /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = example.cpp; sourceTree = "<group>"; };
+ 08668C4F0C19A16300ACB19A /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
+ 08668C560C19AD0100ACB19A /* test_connections.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_connections.cpp; sourceTree = "<group>"; };
                 08C675970C13A03E00D85379 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
                 08C675980C13A03E00D85379 /* test_chain.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_chain.cpp; sourceTree = "<group>"; };
                 08C675990C13A03E00D85379 /* test_counter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_counter.cpp; sourceTree = "<group>"; };
@@ -63,12 +104,34 @@
                 08C6759C0C13A03E00D85379 /* test_mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_mutex.cpp; sourceTree = "<group>"; };
                 08C6759D0C13A03E00D85379 /* test_socket.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_socket.cpp; sourceTree = "<group>"; };
                 08C6759E0C13A03E00D85379 /* test_storage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = test_storage.cpp; sourceTree = "<group>"; };
+ 08EC84040C18DA8100820E53 /* connect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect.hpp; sourceTree = "<group>"; };
+ 08EC847E0C18EC9800820E53 /* connect_slot.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = connect_slot.hpp; sourceTree = "<group>"; };
+ 08EFEADE0C1C892A00097C80 /* instantiator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = instantiator.hpp; sourceTree = "<group>"; };
+ 08EFEB970C1C983500097C80 /* applicator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = applicator.hpp; sourceTree = "<group>"; };
+ 08EFEC040C1CAD0100097C80 /* conditional.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = conditional.hpp; sourceTree = "<group>"; };
+ 08EFEC960C1CC6F200097C80 /* modifier.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = modifier.hpp; sourceTree = "<group>"; };
+ 08EFECA40C1CCE8300097C80 /* storable.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = storable.hpp; sourceTree = "<group>"; };
+ 08EFED440C1CD55100097C80 /* timing_example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timing_example.cpp; sourceTree = "<group>"; };
+ 08F082020C1D591000687E1B /* introduction.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = introduction.qbk; sourceTree = "<group>"; };
+ 08F082570C1DD53400687E1B /* components.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = components.qbk; sourceTree = "<group>"; };
+ 08F0825A0C1DD58500687E1B /* connections.qbk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = connections.qbk; sourceTree = "<group>"; };
+ 08F082840C1DE02F00687E1B /* test_branching.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = test_branching.cpp; sourceTree = "<group>"; };
+ 08FD5DE80C1BA60700F00877 /* html_footer.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_footer.html; sourceTree = "<group>"; };
+ 08FD5DE90C1BA60700F00877 /* html_header.html */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.html; path = html_header.html; sourceTree = "<group>"; };
+ 08FD5DEA0C1BA60700F00877 /* signal_network.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = signal_network.hpp; sourceTree = "<group>"; };
+ 08FD5DEC0C1BA60700F00877 /* boostbook.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = boostbook.css; sourceTree = "<group>"; };
+ 08FD5DED0C1BA60700F00877 /* boostbook_doxygen.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = boostbook_doxygen.css; sourceTree = "<group>"; };
+ 08FD5E450C1BA60800F00877 /* reference.css */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = reference.css; sourceTree = "<group>"; };
+ 08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Jamfile.v2; sourceTree = "<group>"; };
+ 08FD5E4E0C1BA60800F00877 /* signal_network.qbk */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = signal_network.qbk; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXGroup section */
                 080DD7560C13908400EEB53D = {
                         isa = PBXGroup;
                         children = (
+ 08FD5DE40C1BA60700F00877 /* doc */,
+ 08668C4D0C19A16300ACB19A /* example */,
                                 08C675960C13A03E00D85379 /* test */,
                                 080DD76B0C13912C00EEB53D /* signal_network */,
                         );
@@ -90,6 +153,10 @@
                                 080DD7810C13912C00EEB53D /* socket_sender.hpp */,
                                 080DD7820C13912C00EEB53D /* storage.hpp */,
                                 080DD7830C13912C00EEB53D /* timed_generator.hpp */,
+ 08EFEADE0C1C892A00097C80 /* instantiator.hpp */,
+ 08EFEB970C1C983500097C80 /* applicator.hpp */,
+ 08EFEC040C1CAD0100097C80 /* conditional.hpp */,
+ 08EFEC960C1CC6F200097C80 /* modifier.hpp */,
                         );
                         name = signal_network;
                         path = ../../../../boost/signal_network;
@@ -100,19 +167,27 @@
                         children = (
                                 080DD7700C13912C00EEB53D /* connect_slot_template.hpp */,
                                 080DD7710C13912C00EEB53D /* connect_template.hpp */,
- 080DD7720C13912C00EEB53D /* defines.hpp */,
- 080DD7730C13912C00EEB53D /* loader.hpp */,
- 080DD7740C13912C00EEB53D /* main_class_loader.hpp */,
                                 080DD7750C13912C00EEB53D /* serialize_fusion_vector.hpp */,
- 080DD7760C13912C00EEB53D /* slot_type_template.hpp */,
- 080DD7770C13912C00EEB53D /* template_loader.hpp */,
- 080DD7780C13912C00EEB53D /* template_loader2.hpp */,
                                 080DD7790C13912C00EEB53D /* unfused_inherited.hpp */,
                                 080DD77A0C13912C00EEB53D /* unfused_typed_class.hpp */,
+ 08EC84040C18DA8100820E53 /* connect.hpp */,
+ 08EC847E0C18EC9800820E53 /* connect_slot.hpp */,
+ 08EFECA40C1CCE8300097C80 /* storable.hpp */,
                         );
                         path = detail;
                         sourceTree = "<group>";
                 };
+ 08668C4D0C19A16300ACB19A /* example */ = {
+ isa = PBXGroup;
+ children = (
+ 08668C4E0C19A16300ACB19A /* example.cpp */,
+ 08668C4F0C19A16300ACB19A /* Jamfile.v2 */,
+ 08EFED440C1CD55100097C80 /* timing_example.cpp */,
+ );
+ name = example;
+ path = ../../example;
+ sourceTree = SOURCE_ROOT;
+ };
                 08C675960C13A03E00D85379 /* test */ = {
                         isa = PBXGroup;
                         children = (
@@ -124,11 +199,64 @@
                                 08C6759C0C13A03E00D85379 /* test_mutex.cpp */,
                                 08C6759D0C13A03E00D85379 /* test_socket.cpp */,
                                 08C6759E0C13A03E00D85379 /* test_storage.cpp */,
+ 08668C560C19AD0100ACB19A /* test_connections.cpp */,
+ 08F082840C1DE02F00687E1B /* test_branching.cpp */,
                         );
                         name = test;
                         path = ../../test;
                         sourceTree = SOURCE_ROOT;
                 };
+ 08FD5DE40C1BA60700F00877 /* doc */ = {
+ isa = PBXGroup;
+ children = (
+ 08FD5DE50C1BA60700F00877 /* dox */,
+ 08FD5DEB0C1BA60700F00877 /* html */,
+ 08FD5E4D0C1BA60800F00877 /* Jamfile.v2 */,
+ 08FD5E4E0C1BA60800F00877 /* signal_network.qbk */,
+ 08F082020C1D591000687E1B /* introduction.qbk */,
+ 08F082570C1DD53400687E1B /* components.qbk */,
+ 08F0825A0C1DD58500687E1B /* connections.qbk */,
+ );
+ name = doc;
+ path = ../../doc;
+ sourceTree = SOURCE_ROOT;
+ };
+ 08FD5DE50C1BA60700F00877 /* dox */ = {
+ isa = PBXGroup;
+ children = (
+ 08FD5DE60C1BA60700F00877 /* boost */,
+ 08FD5DE80C1BA60700F00877 /* html_footer.html */,
+ 08FD5DE90C1BA60700F00877 /* html_header.html */,
+ 08FD5DEA0C1BA60700F00877 /* signal_network.hpp */,
+ );
+ path = dox;
+ sourceTree = "<group>";
+ };
+ 08FD5DE60C1BA60700F00877 /* boost */ = {
+ isa = PBXGroup;
+ children = (
+ 08FD5DE70C1BA60700F00877 /* signal_network */,
+ );
+ path = boost;
+ sourceTree = "<group>";
+ };
+ 08FD5DE70C1BA60700F00877 /* signal_network */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ path = signal_network;
+ sourceTree = "<group>";
+ };
+ 08FD5DEB0C1BA60700F00877 /* html */ = {
+ isa = PBXGroup;
+ children = (
+ 08FD5DEC0C1BA60700F00877 /* boostbook.css */,
+ 08FD5DED0C1BA60700F00877 /* boostbook_doxygen.css */,
+ 08FD5E450C1BA60800F00877 /* reference.css */,
+ );
+ path = html;
+ sourceTree = "<group>";
+ };
 /* End PBXGroup section */
 
 /* Begin PBXProject section */
@@ -140,7 +268,11 @@
                         projectDirPath = "";
                         targets = (
                                 080DD7670C1390D400EEB53D /* test */,
- 08C675740C139E1300D85379 /* clean test */,
+ 08C675740C139E1300D85379 /* test clean */,
+ 08F0FB080C19826400D0865B /* doc */,
+ 08FD5E6D0C1BA8BC00F00877 /* doc clean */,
+ 08668C500C19A16F00ACB19A /* example */,
+ 08F0836C0C1DF6DE00687E1B /* example clean */,
                         );
                 };
 /* End PBXProject section */
@@ -159,6 +291,19 @@
                         shellPath = /bin/sh;
                         shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../test $style";
                 };
+ 08668C510C19A16F00ACB19A /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../example $style";
+ };
                 08C675730C139E1300D85379 /* ShellScript */ = {
                         isa = PBXShellScriptBuildPhase;
                         buildActionMask = 2147483647;
@@ -172,6 +317,45 @@
                         shellPath = /bin/sh;
                         shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin --clean ../../test $style";
                 };
+ 08F0836D0C1DF6DE00687E1B /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\nstyle=`echo $BUILD_STYLE | sed 'y/DR/dr/'` \nbjam --v2 --toolset=darwin ../../example $style";
+ };
+ 08F0FB070C19826400D0865B /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "cd ../../doc\nbjam --v2 --toolset=darwin release";
+ };
+ 08FD5E6E0C1BA8BC00F00877 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "cd ../../doc\nbjam --v2 --clean --toolset=darwin release";
+ };
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin XCBuildConfiguration section */
@@ -211,6 +395,28 @@
                         };
                         name = Release;
                 };
+ 08668C530C19A16F00ACB19A /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = test;
+ };
+ name = Debug;
+ };
+ 08668C540C19A16F00ACB19A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = test;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
                 08C675760C139E3100D85379 /* Debug */ = {
                         isa = XCBuildConfiguration;
                         buildSettings = {
@@ -233,6 +439,72 @@
                         };
                         name = Release;
                 };
+ 08F0836F0C1DF6DE00687E1B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = test;
+ };
+ name = Debug;
+ };
+ 08F083700C1DF6DE00687E1B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = test;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 08F0FB0A0C19828200D0865B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = doc;
+ };
+ name = Debug;
+ };
+ 08F0FB0B0C19828200D0865B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = doc;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
+ 08FD5E700C1BA8BC00F00877 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = doc;
+ };
+ name = Debug;
+ };
+ 08FD5E710C1BA8BC00F00877 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ PRODUCT_NAME = doc;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -254,7 +526,16 @@
                         defaultConfigurationIsVisible = 0;
                         defaultConfigurationName = Release;
                 };
- 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "clean test" */ = {
+ 08668C520C19A16F00ACB19A /* Build configuration list for PBXAggregateTarget "example" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08668C530C19A16F00ACB19A /* Debug */,
+ 08668C540C19A16F00ACB19A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 08C675750C139E3100D85379 /* Build configuration list for PBXAggregateTarget "test clean" */ = {
                         isa = XCConfigurationList;
                         buildConfigurations = (
                                 08C675760C139E3100D85379 /* Debug */,
@@ -263,6 +544,33 @@
                         defaultConfigurationIsVisible = 0;
                         defaultConfigurationName = Release;
                 };
+ 08F0836E0C1DF6DE00687E1B /* Build configuration list for PBXAggregateTarget "example clean" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08F0836F0C1DF6DE00687E1B /* Debug */,
+ 08F083700C1DF6DE00687E1B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 08F0FB090C19828200D0865B /* Build configuration list for PBXAggregateTarget "doc" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08F0FB0A0C19828200D0865B /* Debug */,
+ 08F0FB0B0C19828200D0865B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 08FD5E6F0C1BA8BC00F00877 /* Build configuration list for PBXAggregateTarget "doc clean" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 08FD5E700C1BA8BC00F00877 /* Debug */,
+ 08FD5E710C1BA8BC00F00877 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
 /* End XCConfigurationList section */
         };
         rootObject = 080DD7580C13908400EEB53D /* Project object */;

Modified: sandbox/SOC/2007/signals/libs/signal_network/doc/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/doc/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/Jamfile.v2 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,54 +1,52 @@
-# Copyright 2007 Stjepan Rajko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-
-project boost/signal_network/doc ;
-
-import boostbook : boostbook ;
-using quickbook ;
-
-local loc = [ path.native [ path.pwd ] ] ;
-local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
-
-xml signal_network_xml : signal_network.qbk ;
-doxygen signal_network_doxygen
- :
- [ glob
- ../../../boost/signal_network/*.hpp
- dox/*.hpp
- dox/boost/signal_network/*.hpp
- ]
- :
- <doxygen:param>TAB_SIZE=4
- <doxygen:param>EXAMPLE_PATH=../example
- <doxygen:param>STRIP_FROM_PATH=$(root)
- <doxygen:param>STRIP_FROM_INC_PATH=$(root)
- <doxygen:param>EXTRACT_ALL=NO
- <doxygen:param>HIDE_UNDOC_MEMBERS=NO
- <doxygen:param>EXTRACT_PRIVATE=NO
- <doxygen:param>DETAILS_AT_TOP=YES
- <doxygen:param>ENABLE_PREPROCESSING=YES
- <doxygen:param>MACRO_EXPANSION=YES
- <doxygen:param>SEARCH_INCLUDES=YES
- <doxygen:param>INCLUDE_PATH=../../..
- <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
- <doxygen:param>GENERATE_HTML=YES
- <doxygen:param>HTML_OUTPUT=$(loc)/html/doxygen
- <doxygen:param>HTML_STYLESHEET=$(loc)/html/boostbook_doxygen.css
- <doxygen:param>HTML_HEADER=$(loc)/dox/html_header.html
- <doxygen:param>HTML_FOOTER=$(loc)/dox/html_footer.html
- ;
-
-boostbook standalone
- :
- signal_network_xml
- signal_network_doxygen
- :
- <xsl:param>chunk.first.sections=1
- <xsl:param>chunk.section.depth=3
- <xsl:param>toc.section.depth=3
- <xsl:param>toc.max.depth=3
- <xsl:param>generate.section.toc.level=3
+# Copyright 2007 Stjepan Rajko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/signal_network/doc ;
+
+import boostbook : boostbook ;
+using quickbook ;
+
+local loc = [ path.native [ path.pwd ] ] ;
+local root = [ path.native [ path.join [ path.pwd ] ../../.. ] ] ;
+
+xml signal_network_xml : signal_network.qbk ;
+doxygen signal_network_doxygen
+ :
+ [ glob
+ ../../../boost/signal_network/*.hpp
+ ]
+ :
+ <doxygen:param>TAB_SIZE=4
+ <doxygen:param>EXAMPLE_PATH=../test
+ <doxygen:param>EXAMPLE_PATH=../example
+ <doxygen:param>STRIP_FROM_PATH=$(root)
+ <doxygen:param>STRIP_FROM_INC_PATH=$(root)
+ <doxygen:param>EXTRACT_ALL=NO
+ <doxygen:param>HIDE_UNDOC_MEMBERS=YES
+ <doxygen:param>EXTRACT_PRIVATE=NO
+ <doxygen:param>ENABLE_PREPROCESSING=YES
+ <doxygen:param>MACRO_EXPANSION=YES
+ <doxygen:param>SEARCH_INCLUDES=YES
+ <doxygen:param>INCLUDE_PATH=../../..
+ <doxygen:param>PREDEFINED=DOXYGEN_DOCS_ONLY
+ <doxygen:param>GENERATE_HTML=YES
+ <doxygen:param>HTML_OUTPUT=$(loc)/html/doxygen
+ <doxygen:param>HTML_STYLESHEET=$(loc)/html/boostbook_doxygen.css
+ <doxygen:param>HTML_HEADER=$(loc)/dox/html_header.html
+ <doxygen:param>HTML_FOOTER=$(loc)/dox/html_footer.html
+ ;
+
+boostbook standalone
+ :
+ signal_network_xml
+ signal_network_doxygen
+ :
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>chunk.section.depth=3
+ <xsl:param>toc.section.depth=3
+ <xsl:param>toc.max.depth=3
+ <xsl:param>generate.section.toc.level=3
     ;
\ No newline at end of file

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/components.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/components.qbk 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,186 @@
+[section:components Components]
+
+[section:generic Generic]
+
+[section:filter filter]
+[*See also]: [classref boost::signal_network::signet::filter filter class reference.]
+
+The __filter__ class is used as a base class for in / out components. It provides support for Signal Network connection operators,
+and provides a default output signal.
+
+[endsect][/filter]
+
+[section:applicator applicator]
+[*See also]: [classref boost::signal_network::signet::applicator applicator class reference.]
+
+The __applicator__ class applies a specified function object to a member variable of a specified type whenever it receives a signal.
+The signal is always forwarded.
+
+Examples of applicators:
+
+* __counter__
+
+[endsect][/applicator]
+
+[section:conditional conditional]
+[*See also]: [classref boost::signal_network::signet::conditional conditional class reference.]
+
+The __conditional__ class applies a specified function object to a member variable of a specified type whenever it receives a signal.
+The signal is forwarded if the function object returns true.
+
+Examples of conditionals:
+
+* __junction__
+
+[endsect][/conditional]
+
+[section:instantiator instantiator]
+[*See also]: [classref boost::signal_network::signet::instantiator instantiator class reference.]
+
+The __instantiator__ class instantiates a specified type from a member variable of a specified type whenever it receives a signal.
+The signal is always forwarded.
+
+Examples of applicators:
+
+* __mutex__
+
+[endsect][/instantiator]
+
+[section:modifier modifier]
+[*See also]: [classref boost::signal_network::signet::modifier modifier class reference.]
+
+The __modifier__ class instantiates a member function object of specified type Member. It applies the member function object
+to each incoming signal, and sends the returned value.
+
+Examples of modifiers:
+
+* __function__
+
+[endsect][/modifier]
+
+[endsect][/generic]
+
+[section:properties Signal Properties]
+[section:storage storage]
+[*See also]: [classref boost::signal_network::signet::storage storage class reference.]
+
+The __storage__ class can store the parameters it receives from a signal, as well as transmit the stored
+parameter values through its own signal.
+
+[table storage class use example
+ [[fused][unfused]]
+ [[[test_storage_fused]][[test_storage_unfused]]]
+]
+[endsect][/storage]
+
+[section:counter counter]
+[*See also]: [classref boost::signal_network::signet::counter counter class reference.]
+
+The __counter__ class counts the number of passing signals. Each time it receives a signal, it will increment an internal
+counter and forward the signal.
+
+[import ../test/test_counter.cpp]
+[table counter class use example
+ [[fused][unfused]]
+ [[[test_counter_fused]][[test_counter_unfused]]]
+]
+
+[endsect][/counter]
+[endsect][/properties]
+
+[section:flow Signal Flow]
+[section:junction junction]
+[*See also]: [classref boost::signal_network::signet::junction junction class reference.]
+
+The __junction__ class can be used to bring in multiple signals, and forward them all to the same set of
+output signals.
+
+[import ../test/test_junction.cpp]
+[table storage class use example
+ [[fused][unfused]]
+ [[[test_junction_fused]][[test_junction_unfused]]]
+]
+[endsect][/junction]
+
+[section:mutex mutex]
+[*See also]: [classref boost::signal_network::signet::mutex mutex class reference.]
+
+The __mutex__ class locks an internal mutex when it receives a signal, and then forwards the signal.
+__mutex__ is an __instantiator__ with the Instantiation boost::mutex::scoped_lock and Member boost::mutex.
+
+[import ../test/test_mutex.cpp]
+[table mutex class use example
+ [[fused][unfused]]
+ [[[test_mutex_fused]][[test_mutex_unfused]]]
+]
+[endsect][/mutex]
+
+[endsect][/flow]
+
+[section:adapters Adapters]
+[section:function function]
+[*See also]: [classref boost::signal_network::signet::function function class reference.]
+
+The __function__ class can be used to apply a function to an incoming signal and output the result.
+__function__ is a __modifier__ with the Modifier set to an adapter for the provided function.
+
+[table function class use example
+ [[fused][unfused]]
+ [[[test_function_fused]][[test_function_unfused]]]
+]
+
+[endsect][/function]
+
+[endsect][/adapters]
+
+[section:topologies Topologies]
+
+[section:chain chain]
+
+The __chain__ class chains together multiple copies of the same component.
+
+[table function class use example
+ [[fused][unfused]]
+ [[[test_chain_fused]][[test_chain_unfused]]]
+]
+
+The example above uses the following classes:
+
+[test_chain_classes]
+
+[endsect][/chain]
+
+[endsect][/topologies]
+
+[section:network Network]
+
+[section:socket_sender socket_sender]
+[*See also]: [classref boost::signal_network::signet::socket_sender socket_sender class reference.]
+
+The __socket_sender__ class can be used to bridge a signal network accross multiple computers via a
+network connection. Any signal going to the __socket_sender__ will be serialized and sent over a provided
+socket. A __socket_receiver__ can be used on the other end to unserialize the signal and forward it.
+
+Example:
+
+[test_socket]
+
+[endsect][/socket_sender]
+
+[section:socket_receiver socket_receiver]
+
+[*See also]: [classref boost::signal_network::signet::socket_receiver socket_receiver class reference.]
+
+The __socket_receiver__ class can be used to bridge a signal network accross multiple computers via a
+network connection. Any signal going to the __socket_sender__ will be serialized and sent over a provided
+socket. A __socket_receiver__ can be used on the other end to unserialize the signal and forward it.
+
+Example:
+
+[test_socket]
+
+[endsect][/socket_receiver]
+
+[endsect][/network]
+
+[endsect][/components]

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/connections.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/connections.qbk 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,111 @@
+[section:connections Connections]
+
+[section:chaining Chaining]
+
+[table chaining example
+ [[fused][unfused]]
+ [[[test_storage_fused]][[test_storage_unfused]]]
+]
+
+[endsect][/chaining]
+
+[section:branching Branching]
+
+More complex connections can also be made relatively easily using
+both `operator >>=`
+and `operator |`
+
+[table branching example
+ [[fused][unfused]]
+ [[[test_branching_fused]][[test_branching_unfused]]]
+]
+
+[endsect][/branching]
+
+[section:pull Pull-based networks]
+
+The Signal Network library was built with push-based networks in
+mind (the data producer sends data through a signal), but it can also
+be used for pull-based networks (the data consumer requests data through
+a signal).
+
+The following example illustrates this:
+
+\dontinclude example.cpp
+\skip PullDoubler
+\until end void pull_test
+
+[endsect][/pull]
+
+[section:disconnect Disconnecting]
+
+\subsection signal_network_disconnect_example Disconnecting connections
+
+Connections can be terminated in two ways. One is through the "trackable"
+mechanism of Boost.Signals, which will automatically destroy connections
+to a trackable object when the object is destroyed. The other
+way is through the disconnect_all_slots method of the signal sender.
+
+\dontinclude example.cpp
+\skip void disconnect_test
+\until end void disconnect_test
+
+[endsect][/disconnect]
+
+[section:multiple_different Multiple inputs of different signatures]
+
+It is simple to have an object provide multiple slots through operator() functions
+of different signatures. The following class does so through providing 1-ary slots
+of different types:
+
+\dontinclude example.cpp
+\skip class SignalIntFloatCollector
+\until end class
+
+The following class, on the other hand, uses slots of different number of arguments:
+\dontinclude example.cpp
+\skip class SignalMultiCollector
+\until end class
+
+In such cases, where the operator() functions differ in their signature,
+standard connection operators will work out the correct connection:
+
+\dontinclude example.cpp
+\skip void multi_type_test
+\until end void multi_type_test
+
+[endsect][/multiple_different]
+
+[section:multiple_same Multiple inputs of the same signature]
+
+In some cases, a class may want to receive multiple signals of the same
+signature. For example, the following class can receive a void() signal
+through its inherited operator() function, as well as through the
+operator() function of member "other":
+\dontinclude example.cpp
+\skip class Signal2VoidCounter
+\until end class
+
+Similarly, the following class could receive void() signals both
+through operator() and through AltInput:
+\dontinclude example.cpp
+\skip class Signal2VoidInputs
+\until end class
+
+The following example shows how to connect signals to all of the above slots.
+For the class Signal2VoidInputs, this is accomplished using the
+slot_selector function:
+\skip void multi_in_test
+\until end void multi_in_test
+
+[endsect][/multiple_same]
+
+[section:multi_out Multiple outputs]
+
+\dontinclude example.cpp
+\skip class SignalOutIntFloat
+\until end void multi_out_test
+
+[endsect][/multi_out]
+
+[endsect][/connections]

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow1.svg
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow1.svg 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.45"
+ sodipodi:docbase="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc"
+ sodipodi:docname="dataflow1.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow1.png"
+ inkscape:export-xdpi="99.836685"
+ inkscape:export-ydpi="99.836685"
+ sodipodi:modified="TRUE">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3156">
+ <stop
+ id="stop3176"
+ offset="0"
+ style="stop-color:#eef56c;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3160" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient3174"
+ x1="276.84592"
+ y1="132.74704"
+ x2="497.81357"
+ y2="255.48058"
+ gradientUnits="userSpaceOnUse" />
+ <filter
+ inkscape:collect="always"
+ id="filter3308">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.55996387"
+ id="feGaussianBlur3310" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="375"
+ inkscape:cy="873.25603"
+ inkscape:document-units="px"
+ inkscape:current-layer="g3312"
+ inkscape:window-width="1302"
+ inkscape:window-height="759"
+ inkscape:window-x="0"
+ inkscape:window-y="22" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g3312">
+ <g
+ id="g3386">
+ <rect
+ style="opacity:1;color:#000000;fill:url(#linearGradient3174);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate"
+ id="rect2162"
+ width="253.3027"
+ height="92.753075"
+ x="257.14285"
+ y="149.50504" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="278.15045"
+ y="177.52679"
+ id="text2164"><tspan
+ sodipodi:role="line"
+ id="tspan2166"
+ x="278.15045"
+ y="177.52679">1. grab the image from the camera</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="192.52679"
+ id="tspan2168">2. modify the image</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="207.52679"
+ id="tspan2172">3. display the image</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="222.52679"
+ id="tspan2178">4. repeat</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="237.52679"
+ id="tspan2174" /></text>
+ </g>
+ </g>
+ </g>
+</svg>

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow2.svg
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow2.svg 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.45"
+ sodipodi:docbase="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc"
+ sodipodi:docname="dataflow2.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow2.png"
+ inkscape:export-xdpi="99.610085"
+ inkscape:export-ydpi="99.610085"
+ sodipodi:modified="TRUE">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="TriangleOutL"
+ style="overflow:visible">
+ <path
+ id="path3570"
+ d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="Legs"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Legs"
+ style="overflow:visible">
+ <g
+ id="g3521"
+ transform="scale(-0.7)">
+ <g
+ id="g3523"
+ transform="matrix(0,-1.000000,-1.000000,0,20.70862,21.31391)">
+ <path
+ id="path3525"
+ d="M 21.221250,20.675360 C 14.311099,25.396517 18.766725,27.282204 15.380179,34.118595"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;marker-start:none;marker-end:none" />
+ <path
+ id="path3527"
+ d="M 21.398110,20.548120 C 20.037601,28.895644 24.934182,29.318060 25.903151,34.373078"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;marker-start:none;marker-end:none" />
+ </g>
+ <path
+ id="path3529"
+ d="M -14.090070,-6.7318716 L -15.012238,-2.6884886 L -11.049487,-3.9115586 L -14.090070,-6.7318716 z "
+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt;marker-end:none" />
+ <path
+ id="path3531"
+ d="M -15.215679,4.5567534 L -13.341552,8.2563664 L -11.074678,4.7835114 L -15.215679,4.5567534 z "
+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt;marker-end:none" />
+ </g>
+ </marker>
+ <marker
+ inkscape:stockid="Club"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Club"
+ style="overflow:visible">
+ <path
+ id="path3501"
+ d="M -1.5971367,-7.0977635 C -3.4863874,-7.0977635 -5.0235187,-5.5606321 -5.0235187,-3.6713813 C -5.0235187,-3.0147015 -4.7851656,-2.4444556 -4.4641095,-1.9232271 C -4.5028609,-1.8911157 -4.5437814,-1.8647646 -4.5806531,-1.8299921 C -5.2030765,-2.6849849 -6.1700514,-3.2751330 -7.3077730,-3.2751330 C -9.1970245,-3.2751331 -10.734155,-1.7380016 -10.734155,0.15124914 C -10.734155,2.0404999 -9.1970245,3.5776313 -7.3077730,3.5776313 C -6.3143268,3.5776313 -5.4391540,3.1355702 -4.8137404,2.4588126 C -4.9384274,2.8137041 -5.0235187,3.1803000 -5.0235187,3.5776313 C -5.0235187,5.4668819 -3.4863874,7.0040135 -1.5971367,7.0040135 C 0.29211394,7.0040135 1.8292454,5.4668819 1.8292454,3.5776313 C 1.8292454,2.7842354 1.5136868,2.0838028 1.0600576,1.5031550 C 2.4152718,1.7663868 3.7718375,2.2973711 4.7661444,3.8340272 C 4.0279463,3.0958289 3.5540908,1.7534117 3.5540908,-0.058529361 L 2.9247554,-0.10514681 L 3.5074733,-0.12845553 C 3.5074733,-1.9403966 3.9580199,-3.2828138 4.6962183,-4.0210121 C 3.7371277,-2.538781
3 2.4390549,-1.9946496 1.1299838,-1.7134486 C 1.5341802,-2.2753578 1.8292454,-2.9268556 1.8292454,-3.6713813 C 1.8292454,-5.5606319 0.29211394,-7.0977635 -1.5971367,-7.0977635 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:0.74587913pt;marker-start:none"
+ transform="scale(0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Scissors"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Scissors"
+ style="overflow:visible">
+ <path
+ id="schere"
+ style="marker-start:none"
+ d="M 9.0898857,-3.6061018 C 8.1198849,-4.7769976 6.3697607,-4.7358294 5.0623558,-4.2327734 L -3.1500488,-1.1548705 C -5.5383421,-2.4615840 -7.8983361,-2.0874077 -7.8983361,-2.7236578 C -7.8983361,-3.2209742 -7.4416699,-3.1119800 -7.5100293,-4.4068519 C -7.5756648,-5.6501286 -8.8736064,-6.5699315 -10.100428,-6.4884954 C -11.327699,-6.4958500 -12.599867,-5.5553341 -12.610769,-4.2584343 C -12.702194,-2.9520479 -11.603560,-1.7387447 -10.304005,-1.6532027 C -8.7816644,-1.4265411 -6.0857470,-2.3487593 -4.8210600,-0.082342643 C -5.7633447,1.6559151 -7.4350844,1.6607341 -8.9465707,1.5737277 C -10.201445,1.5014928 -11.708664,1.8611256 -12.307219,3.0945882 C -12.885586,4.2766744 -12.318421,5.9591904 -10.990470,6.3210002 C -9.6502788,6.8128279 -7.8098011,6.1912892 -7.4910978,4.6502760 C -7.2454393,3.4624530 -8.0864637,2.9043186 -7.7636052,2.4731223 C -7.5199917,2.1477623 -5.9728246,2.3362771 -3.2164999,1.0982979 L 5.6763468,4.2330688 C 6.8000164,4.5467672 8.1730685,4.5362646 9.1684433,3.4313614 L -0.051640930
,-0.053722219 L 9.0898857,-3.6061018 z M -9.2179159,-5.5066058 C -7.9233569,-4.7838060 -8.0290767,-2.8230356 -9.3743431,-2.4433169 C -10.590861,-2.0196559 -12.145370,-3.2022863 -11.757521,-4.5207817 C -11.530373,-5.6026336 -10.104134,-6.0014137 -9.2179159,-5.5066058 z M -9.1616516,2.5107591 C -7.8108215,3.0096239 -8.0402087,5.2951947 -9.4138723,5.6023681 C -10.324932,5.9187072 -11.627422,5.4635705 -11.719569,4.3902287 C -11.897178,3.0851737 -10.363484,1.9060805 -9.1616516,2.5107591 z " />
+ </marker>
+ <marker
+ inkscape:stockid="StopL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="StopL"
+ style="overflow:visible">
+ <path
+ id="path3561"
+ d="M 0.0,5.65 L 0.0,-5.65"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="CurvyCross"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="CurvyCross"
+ style="overflow:visible">
+ <g
+ id="g3536"
+ transform="scale(0.6)">
+ <path
+ id="path3538"
+ d="M 4.6254930,-5.0456926 C 1.8654930,-5.0456926 -0.37450702,-2.8056926 -0.37450702,-0.045692580 C -0.37450702,2.7143074 1.8654930,4.9543074 4.6254930,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none" />
+ <path
+ id="path3540"
+ d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none" />
+ </g>
+ </marker>
+ <marker
+ inkscape:stockid="CurveOut"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="CurveOut"
+ style="overflow:visible">
+ <path
+ id="path3543"
+ d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none"
+ transform="scale(0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="RazorWire"
+ id="RazorWire"
+ refX="0"
+ refY="0"
+ orient="auto">
+ style=&quot;overflow:visible&quot;&gt;
+ <path
+ id="path3498"
+ transform="scale(0.8,0.8)"
+ style="fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1pt"
+ d="M 0.022727273,-0.74009011 L 0.022727273,0.69740989 L -7.7585227,3.0099099 L 10.678977,3.0099099 L 3.4914773,0.69740989 L 3.4914773,-0.74009011 L 10.741477,-2.8963401 L -7.7272727,-2.8963401 L 0.022727273,-0.74009011 z " />
+</marker>
+ <linearGradient
+ id="linearGradient3156">
+ <stop
+ id="stop3176"
+ offset="0"
+ style="stop-color:#eef56c;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3160" />
+ </linearGradient>
+ <filter
+ inkscape:collect="always"
+ id="filter3308">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.55996387"
+ id="feGaussianBlur3310" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient3413"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient3473"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="497.81357"
+ y2="255.48058"
+ gradientTransform="translate(-169.70562,-3.0304577)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="375"
+ inkscape:cy="873.25603"
+ inkscape:document-units="px"
+ inkscape:current-layer="g3386"
+ inkscape:window-width="1302"
+ inkscape:window-height="759"
+ inkscape:window-x="0"
+ inkscape:window-y="22" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g3312">
+ <g
+ id="g3386"
+ transform="translate(132.32998,-3.0304577)">
+ <rect
+ style="opacity:1;color:#000000;fill:url(#linearGradient3413);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate"
+ id="rect2162"
+ width="164.91435"
+ height="94.773384"
+ x="257.14285"
+ y="149.50504" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="278.15045"
+ y="177.52679"
+ id="text2164"><tspan
+ sodipodi:role="line"
+ id="tspan2166"
+ x="278.15045"
+ y="177.52679" /><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="192.52679"
+ id="tspan2168">1. modify the image</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="207.52679"
+ id="tspan2172">2. display the image</tspan><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="222.52679"
+ id="tspan2178" /><tspan
+ sodipodi:role="line"
+ x="278.15045"
+ y="237.52679"
+ id="tspan2174" /></text>
+ </g>
+ <rect
+ style="color:#000000;fill:url(#linearGradient3473);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate"
+ id="rect3397"
+ width="253.3027"
+ height="92.753075"
+ x="87.437233"
+ y="146.47458" />
+ <g
+ transform="translate(-167.18024,-32.829958)"
+ id="g3421">
+ <rect
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235668;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect3415"
+ width="91.92392"
+ height="18.687815"
+ x="425.7793"
+ y="185.14622" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="435.88083"
+ y="198.2782"
+ id="text3417"><tspan
+ sodipodi:role="line"
+ id="tspan3419"
+ x="435.88083"
+ y="198.2782">image</tspan></text>
+ </g>
+ <g
+ id="g3426"
+ transform="translate(-44.4467,-32.829958)">
+ <rect
+ y="185.14622"
+ x="425.7793"
+ height="18.687815"
+ width="91.92392"
+ id="rect3428"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235666;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:2,4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <text
+ id="text3430"
+ y="198.2782"
+ x="435.88083"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="198.2782"
+ x="435.88083"
+ id="tspan3432"
+ sodipodi:role="line">image</tspan></text>
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#TriangleOutL)"
+ d="M 351.02298,161.66017 L 380.8326,161.66017"
+ id="path3683"
+ transform="translate(44.4467,32.829958)"
+ inkscape:connector-type="polyline"
+ inkscape:connection-start="#g3421"
+ inkscape:connection-end="#rect3428" />
+ </g>
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="114.85072"
+ y="168.98723"
+ id="text4667"><tspan
+ sodipodi:role="line"
+ id="tspan4669"
+ x="114.85072"
+ y="168.98723" /><tspan
+ sodipodi:role="line"
+ x="114.85072"
+ y="183.98723"
+ id="tspan4671" /><tspan
+ sodipodi:role="line"
+ x="114.85072"
+ y="198.98723"
+ id="tspan4673">output image signal every frame</tspan><tspan
+ sodipodi:role="line"
+ x="114.85072"
+ y="213.98723"
+ id="tspan4675" /><tspan
+ sodipodi:role="line"
+ x="114.85072"
+ y="228.98723"
+ id="tspan4677" /></text>
+ </g>
+ </g>
+</svg>

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow3.svg
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow3.svg 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.45"
+ sodipodi:docbase="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc"
+ sodipodi:docname="dataflow3.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc/dataflow3.png"
+ inkscape:export-xdpi="99.816666"
+ inkscape:export-ydpi="99.816666"
+ sodipodi:modified="TRUE">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="TriangleOutL"
+ style="overflow:visible">
+ <path
+ id="path3570"
+ d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none"
+ transform="scale(0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="Legs"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Legs"
+ style="overflow:visible">
+ <g
+ id="g3521"
+ transform="scale(-0.7)">
+ <g
+ id="g3523"
+ transform="matrix(0,-1.000000,-1.000000,0,20.70862,21.31391)">
+ <path
+ id="path3525"
+ d="M 21.221250,20.675360 C 14.311099,25.396517 18.766725,27.282204 15.380179,34.118595"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;marker-start:none;marker-end:none" />
+ <path
+ id="path3527"
+ d="M 21.398110,20.548120 C 20.037601,28.895644 24.934182,29.318060 25.903151,34.373078"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;marker-start:none;marker-end:none" />
+ </g>
+ <path
+ id="path3529"
+ d="M -14.090070,-6.7318716 L -15.012238,-2.6884886 L -11.049487,-3.9115586 L -14.090070,-6.7318716 z "
+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt;marker-end:none" />
+ <path
+ id="path3531"
+ d="M -15.215679,4.5567534 L -13.341552,8.2563664 L -11.074678,4.7835114 L -15.215679,4.5567534 z "
+ style="fill:#030300;fill-rule:evenodd;stroke-width:1.0000000pt;marker-end:none" />
+ </g>
+ </marker>
+ <marker
+ inkscape:stockid="Club"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Club"
+ style="overflow:visible">
+ <path
+ id="path3501"
+ d="M -1.5971367,-7.0977635 C -3.4863874,-7.0977635 -5.0235187,-5.5606321 -5.0235187,-3.6713813 C -5.0235187,-3.0147015 -4.7851656,-2.4444556 -4.4641095,-1.9232271 C -4.5028609,-1.8911157 -4.5437814,-1.8647646 -4.5806531,-1.8299921 C -5.2030765,-2.6849849 -6.1700514,-3.2751330 -7.3077730,-3.2751330 C -9.1970245,-3.2751331 -10.734155,-1.7380016 -10.734155,0.15124914 C -10.734155,2.0404999 -9.1970245,3.5776313 -7.3077730,3.5776313 C -6.3143268,3.5776313 -5.4391540,3.1355702 -4.8137404,2.4588126 C -4.9384274,2.8137041 -5.0235187,3.1803000 -5.0235187,3.5776313 C -5.0235187,5.4668819 -3.4863874,7.0040135 -1.5971367,7.0040135 C 0.29211394,7.0040135 1.8292454,5.4668819 1.8292454,3.5776313 C 1.8292454,2.7842354 1.5136868,2.0838028 1.0600576,1.5031550 C 2.4152718,1.7663868 3.7718375,2.2973711 4.7661444,3.8340272 C 4.0279463,3.0958289 3.5540908,1.7534117 3.5540908,-0.058529361 L 2.9247554,-0.10514681 L 3.5074733,-0.12845553 C 3.5074733,-1.9403966 3.9580199,-3.2828138 4.6962183,-4.0210121 C 3.7371277,-2.538781
3 2.4390549,-1.9946496 1.1299838,-1.7134486 C 1.5341802,-2.2753578 1.8292454,-2.9268556 1.8292454,-3.6713813 C 1.8292454,-5.5606319 0.29211394,-7.0977635 -1.5971367,-7.0977635 z "
+ style="fill-rule:evenodd;stroke:#000000;stroke-width:0.74587913pt;marker-start:none"
+ transform="scale(0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="Scissors"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="Scissors"
+ style="overflow:visible">
+ <path
+ id="schere"
+ style="marker-start:none"
+ d="M 9.0898857,-3.6061018 C 8.1198849,-4.7769976 6.3697607,-4.7358294 5.0623558,-4.2327734 L -3.1500488,-1.1548705 C -5.5383421,-2.4615840 -7.8983361,-2.0874077 -7.8983361,-2.7236578 C -7.8983361,-3.2209742 -7.4416699,-3.1119800 -7.5100293,-4.4068519 C -7.5756648,-5.6501286 -8.8736064,-6.5699315 -10.100428,-6.4884954 C -11.327699,-6.4958500 -12.599867,-5.5553341 -12.610769,-4.2584343 C -12.702194,-2.9520479 -11.603560,-1.7387447 -10.304005,-1.6532027 C -8.7816644,-1.4265411 -6.0857470,-2.3487593 -4.8210600,-0.082342643 C -5.7633447,1.6559151 -7.4350844,1.6607341 -8.9465707,1.5737277 C -10.201445,1.5014928 -11.708664,1.8611256 -12.307219,3.0945882 C -12.885586,4.2766744 -12.318421,5.9591904 -10.990470,6.3210002 C -9.6502788,6.8128279 -7.8098011,6.1912892 -7.4910978,4.6502760 C -7.2454393,3.4624530 -8.0864637,2.9043186 -7.7636052,2.4731223 C -7.5199917,2.1477623 -5.9728246,2.3362771 -3.2164999,1.0982979 L 5.6763468,4.2330688 C 6.8000164,4.5467672 8.1730685,4.5362646 9.1684433,3.4313614 L -0.051640930
,-0.053722219 L 9.0898857,-3.6061018 z M -9.2179159,-5.5066058 C -7.9233569,-4.7838060 -8.0290767,-2.8230356 -9.3743431,-2.4433169 C -10.590861,-2.0196559 -12.145370,-3.2022863 -11.757521,-4.5207817 C -11.530373,-5.6026336 -10.104134,-6.0014137 -9.2179159,-5.5066058 z M -9.1616516,2.5107591 C -7.8108215,3.0096239 -8.0402087,5.2951947 -9.4138723,5.6023681 C -10.324932,5.9187072 -11.627422,5.4635705 -11.719569,4.3902287 C -11.897178,3.0851737 -10.363484,1.9060805 -9.1616516,2.5107591 z " />
+ </marker>
+ <marker
+ inkscape:stockid="StopL"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="StopL"
+ style="overflow:visible">
+ <path
+ id="path3561"
+ d="M 0.0,5.65 L 0.0,-5.65"
+ style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
+ transform="scale(0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="CurvyCross"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="CurvyCross"
+ style="overflow:visible">
+ <g
+ id="g3536"
+ transform="scale(0.6)">
+ <path
+ id="path3538"
+ d="M 4.6254930,-5.0456926 C 1.8654930,-5.0456926 -0.37450702,-2.8056926 -0.37450702,-0.045692580 C -0.37450702,2.7143074 1.8654930,4.9543074 4.6254930,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none" />
+ <path
+ id="path3540"
+ d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none" />
+ </g>
+ </marker>
+ <marker
+ inkscape:stockid="CurveOut"
+ orient="auto"
+ refY="0.0"
+ refX="0.0"
+ id="CurveOut"
+ style="overflow:visible">
+ <path
+ id="path3543"
+ d="M -5.4129913,-5.0456926 C -2.6529913,-5.0456926 -0.41299131,-2.8056926 -0.41299131,-0.045692580 C -0.41299131,2.7143074 -2.6529913,4.9543074 -5.4129913,4.9543074"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;marker-end:none"
+ transform="scale(0.6)" />
+ </marker>
+ <marker
+ inkscape:stockid="RazorWire"
+ id="RazorWire"
+ refX="0"
+ refY="0"
+ orient="auto">
+ style=&quot;overflow:visible&quot;&gt;
+ <path
+ id="path3498"
+ transform="scale(0.8,0.8)"
+ style="fill:#808080;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.1pt"
+ d="M 0.022727273,-0.74009011 L 0.022727273,0.69740989 L -7.7585227,3.0099099 L 10.678977,3.0099099 L 3.4914773,0.69740989 L 3.4914773,-0.74009011 L 10.741477,-2.8963401 L -7.7272727,-2.8963401 L 0.022727273,-0.74009011 z " />
+</marker>
+ <linearGradient
+ id="linearGradient3156">
+ <stop
+ id="stop3176"
+ offset="0"
+ style="stop-color:#eef56c;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3160" />
+ </linearGradient>
+ <filter
+ inkscape:collect="always"
+ id="filter3308">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.55996387"
+ id="feGaussianBlur3310" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient3413"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient3473"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="497.81357"
+ y2="255.48058"
+ gradientTransform="translate(-205.56604,-4.5456865)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4695"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4740"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4742"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4797"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-205.56604,-4.5456865)"
+ x1="276.84592"
+ y1="132.74704"
+ x2="497.81357"
+ y2="255.48058" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4799"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3156"
+ id="linearGradient4816"
+ gradientUnits="userSpaceOnUse"
+ x1="276.84592"
+ y1="132.74704"
+ x2="395.78815"
+ y2="225.68108" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="464.33843"
+ inkscape:cy="853.05298"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ inkscape:window-width="1302"
+ inkscape:window-height="759"
+ inkscape:window-x="0"
+ inkscape:window-y="22" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ y="144.95935"
+ x="51.576817"
+ height="92.753075"
+ width="253.3027"
+ id="rect3397"
+ style="color:#000000;fill:url(#linearGradient4797);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate" />
+ <g
+ id="g3421"
+ transform="translate(-203.04066,-34.345187)">
+ <rect
+ y="185.14622"
+ x="425.7793"
+ height="18.687815"
+ width="91.92392"
+ id="rect3415"
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235666;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <text
+ id="text3417"
+ y="198.2782"
+ x="435.88083"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="198.2782"
+ x="435.88083"
+ id="tspan3419"
+ sodipodi:role="line">image</tspan></text>
+ </g>
+ <g
+ transform="translate(96.469565,-4.5456865)"
+ id="g3386"
+ inkscape:export-xdpi="99.610146"
+ inkscape:export-ydpi="99.610146">
+ <rect
+ y="149.50504"
+ x="257.14285"
+ height="94.773384"
+ width="164.91435"
+ id="rect2162"
+ style="opacity:1;color:#000000;fill:url(#linearGradient4799);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate" />
+ <text
+ id="text2164"
+ y="185.60802"
+ x="287.74689"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="185.60802"
+ x="287.74689"
+ id="tspan2166"
+ sodipodi:role="line" /><tspan
+ id="tspan2178"
+ y="200.60802"
+ x="287.74689"
+ sodipodi:role="line">modify the image</tspan><tspan
+ id="tspan2174"
+ y="215.60802"
+ x="287.74689"
+ sodipodi:role="line" /></text>
+ </g>
+ <g
+ transform="translate(-80.307115,-34.345187)"
+ id="g3426">
+ <rect
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235666;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect3428"
+ width="91.92392"
+ height="18.687815"
+ x="425.7793"
+ y="185.14622" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="435.88083"
+ y="198.2782"
+ id="text3430"><tspan
+ sodipodi:role="line"
+ id="tspan3432"
+ x="435.88083"
+ y="198.2782">image</tspan></text>
+ <path
+ inkscape:connection-end="#rect3428"
+ inkscape:connection-start="#g3421"
+ inkscape:connector-type="polyline"
+ transform="translate(44.4467,32.829958)"
+ id="path3683"
+ d="M 351.02297,161.66017 L 380.8326,161.66017"
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-opacity:1" />
+ </g>
+ <g
+ transform="translate(20.203033,26.516504)"
+ id="g4749">
+ <rect
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235666;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect4751"
+ width="91.92392"
+ height="18.687815"
+ x="425.7793"
+ y="185.14622" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="435.88083"
+ y="198.2782"
+ id="text4753"><tspan
+ sodipodi:role="line"
+ id="tspan4755"
+ x="435.88083"
+ y="198.2782">image</tspan></text>
+ </g>
+ <text
+ id="text4667"
+ y="167.472"
+ x="78.990311"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="167.472"
+ x="78.990311"
+ id="tspan4669"
+ sodipodi:role="line" /><tspan
+ id="tspan4671"
+ y="182.472"
+ x="78.990311"
+ sodipodi:role="line" /><tspan
+ id="tspan4673"
+ y="197.472"
+ x="78.990311"
+ sodipodi:role="line">output image signal every frame</tspan><tspan
+ id="tspan4675"
+ y="212.472"
+ x="78.990311"
+ sodipodi:role="line" /><tspan
+ id="tspan4677"
+ y="227.472"
+ x="78.990311"
+ sodipodi:role="line" /></text>
+ <g
+ id="g4832">
+ <g
+ transform="translate(312.13713,56.568542)"
+ id="g4714">
+ <rect
+ y="149.50504"
+ x="257.14285"
+ height="94.773384"
+ width="164.91435"
+ id="rect4716"
+ style="opacity:1;color:#000000;fill:url(#linearGradient4816);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3308);enable-background:accumulate" />
+ <text
+ id="text4718"
+ y="171.97096"
+ x="287.24182"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ xml:space="preserve"><tspan
+ y="171.97096"
+ x="287.24182"
+ id="tspan4720"
+ sodipodi:role="line" /><tspan
+ id="tspan4722"
+ y="186.97096"
+ x="287.24182"
+ sodipodi:role="line" /><tspan
+ id="tspan4724"
+ y="201.97096"
+ x="287.24182"
+ sodipodi:role="line">display the image</tspan><tspan
+ id="tspan4726"
+ y="216.97096"
+ x="287.24182"
+ sodipodi:role="line" /><tspan
+ id="tspan4728"
+ y="231.97096"
+ x="287.24182"
+ sodipodi:role="line" /></text>
+ </g>
+ <g
+ transform="translate(135.36045,26.769042)"
+ id="g4730">
+ <rect
+ style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.59235666;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect4732"
+ width="91.92392"
+ height="18.687815"
+ x="425.7793"
+ y="185.14622" />
+ <text
+ xml:space="preserve"
+ style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+ x="435.88083"
+ y="198.2782"
+ id="text4734"><tspan
+ sodipodi:role="line"
+ id="tspan4736"
+ x="435.88083"
+ y="198.2782">image</tspan></text>
+ </g>
+ </g>
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:1;color:#000000;fill-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 538.40625,221.10853 L 560.63975,221.15728"
+ id="path4830"
+ inkscape:connector-type="polyline"
+ inkscape:connection-start="#g4749"
+ inkscape:connection-end="#g4730" />
+ </g>
+</svg>

Modified: sandbox/SOC/2007/signals/libs/signal_network/doc/dox/signal_network.hpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/doc/dox/signal_network.hpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/dox/signal_network.hpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -3,192 +3,10 @@
 
 /** \mainpage
 
-\section sec_tutorial Tutorial
- This tutorial explains the use of the Signal Network library, and is based on elements of the library
- that have working prototypes.
-
-\section signal_network_namespace Namespace use
- The connection operators (and a few other things) are located in the boost::signal_network namespace.
- All of the components are in the boost::signal_network::signet namespace.
-
- It is recommended that you do
-\code
-using namespace boost::signal_network
-\endcode
- so that your code can use the operators >>= and |, and you can access the components via signet::\em component.
-
- Otherwise, the following might be helpful:
-\code
-namespace signet = boost::signal_network::signet;
-\endcode
-
-\section signal_network_examples Examples
-
-\par Creating connections and components
-
- \li \ref signal_network_simple_example
- \li \ref signal_network_receiving_example
- \li \ref signal_network_branching_example
- \li \ref signal_network_pull_example
- \li \ref signal_network_disconnect_example
- \li \ref signal_network_multi_in_simple_example
- \li \ref signal_network_multi_in_example
- \li \ref signal_network_multi_out_example
-
-\par Flow control and signal storage components
-
-The following components have examples in their documentation:
-
- \li signet::storage for storing and forwarding values.
- \li signet::junction for signal branching and flow control.
- \li signet::selector for selection between multiple signals.
-
-\par Classes for creating new components
-
-The following classes have examples in their documentation:
-
- \li signet::filter is a base class for filters (components that receive and send a signal).
- \li signet::function can be used to convert functions into filters.
-
-\par Threading components
-
-The following components have examples in their documentation:
-
- \li signet::timed_generator for periodic sending of signals in a separate thread.
- \li signet::mutex for thread control when using signals from separate threads.
-
-\par Network topologies
-
-The following components have examples in their documentation:
-
- \li signet::chain implements the chain topology.
-
-\par Signal networks accross multiple computers using Boost.Serialization and the Boost asio library.
-
-The following components have examples in their documentation:
-
- \li signet::socket_sender sends serializable signals accross the network.
- \li signet::socket_receiver receives serializable signals from the network.
-
-\subsection signal_network_simple_example Simple connections using Signal Network components
-
- The Sigal Network library provides many common building block components for a
- signal network. The most basic is \link signet::storage storage\endlink, which
- can be used to store a value received through a signal, send it on, and/or retreive it.
-
- By default, components in the library use operator() to receive a signal.
- For example, \link boost::signal_network::signet::storage storage\endlink objects can receive
- signals through \link boost::signal_network::signet::storage::operator()()
- operator()()\endlink. Upon receiving this signal,
- they will output their stored value through another signal.
-
- The value stored inside a \link boost::signal_network::signet::storage storage\endlink object
- can be retrieved via the \link boost::signal_network::signet::storage::valueN() valueN()\endlink
- function.
-
- Using a few \link boost::signal_network::signet::storage storage\endlink objects, it is easy to
- create a network using \link boost::signal_network::operator>>=() operator>>=\endlink:
-
- \dontinclude example.cpp
- \skip simple_test
- \until end void simple_test
-
-\subsection signal_network_receiving_example Creating your own signal receiver (slot)
-
- The easiest way to create your own signal receiver which can be used with the Signal Network
- library is to create a class with operator() of the signal signature you wish to receive.
-
- For example, consider the signature "void ()". This is the signature
- of a function that returns void and takes no arguments.
- A class that can receive signals of such a signature would be
- defined as follows:
-
- \dontinclude example.cpp
- \skip class SignalVoidCounter
- \until end class SignalVoidCounter
-
-
-
 \subsection signal_network_branching_example Branching connections
- More complex connections can also be made relatively easily using
- both \link boost::signal_network::operator>>=() operator >>= \endlink
- and \link boost::signal_network::operator|() operator | \endlink:
-
- \dontinclude example.cpp
- \skip branching_test
- \until end void branching_test
-
-\subsection signal_network_pull_example Building a pull-based network
- The Signal Network library was built with push-based networks in
- mind (the data producer sends data through a signal), but it can also
- be used for pull-based networks (the data consumer requests data through
- a signal).
 
- The following example illustrates this:
-
- \dontinclude example.cpp
- \skip PullDoubler
- \until end void pull_test
-
-\subsection signal_network_disconnect_example Disconnecting connections
- Connections can be terminated in two ways. One is through the "trackable"
- mechanism of Boost.Signals, which will automatically destroy connections
- to a trackable object when the object is destroyed. The other
- way is through the disconnect_all_slots method of the signal sender.
-
- \dontinclude example.cpp
- \skip void disconnect_test
- \until end void disconnect_test
-
-\subsection signal_network_multi_in_simple_example Multiple inputs of different signatures
-
- It is simple to have an object provide multiple slots through operator() functions
- of different signatures. The following class does so through providing 1-ary slots
- of different types:
-
- \dontinclude example.cpp
- \skip class SignalIntFloatCollector
- \until end class
-
- The following class, on the other hand, uses slots of different number of arguments:
- \dontinclude example.cpp
- \skip class SignalMultiCollector
- \until end class
-
- In such cases, where the operator() functions differ in their signature,
- standard connection operators will work out the correct connection:
-
- \dontinclude example.cpp
- \skip void multi_type_test
- \until end void multi_type_test
-
-\subsection signal_network_multi_in_example Multiple inputs of the same signature
-
- In some cases, a class may want to receive multiple signals of the same
- signature. For example, the following class can receive a void() signal
- through its inherited operator() function, as well as through the
- operator() function of member "other":
- \dontinclude example.cpp
- \skip class Signal2VoidCounter
- \until end class
-
- Similarly, the following class could receive void() signals both
- through operator() and through AltInput:
- \dontinclude example.cpp
- \skip class Signal2VoidInputs
- \until end class
-
- The following example shows how to connect signals to all of the above slots.
- For the class Signal2VoidInputs, this is accomplished using the
- slot_selector function:
- \skip void multi_in_test
- \until end void multi_in_test
-
-\subsection signal_network_multi_out_example Multiple outputs
 
- \dontinclude example.cpp
- \skip class SignalOutIntFloat
- \until end void multi_out_test
+
         
 */
 

Added: sandbox/SOC/2007/signals/libs/signal_network/doc/introduction.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/introduction.qbk 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -0,0 +1,381 @@
+[section:introduction Introduction]
+
+[section:dataflow Dataflow-oriented programming in C++]
+
+[note The purpose of this section is to place the Signal Network library in the bigger picture.
+It is only a start, so please forgive the incompleteness and possible inaccuracies.
+A lot of the ideas in this section have come from a discussion with Tobias Schwinger,
+whom I thank sincerely for his continuing help and suggestions.]
+
+The Signal Network library attempts to afford some of the benefits of
+[@http://en.wikipedia.org/wiki/Dataflow_language dataflow languages] to portable, generic C++, while
+at the same time allowing the power and flexibility of C++ to be used easily
+in a dataflow-oriented environment. It does so by
+facilitating large-scale use of Boost.Signals as a mechanism to model the transfer
+of data between processing components.
+
+[*["I don't get it. Data is all over the place in C++. How is it not already a dataflow language?]]
+
+The wikipedia description of [@http://en.wikipedia.org/wiki/Dataflow_language dataflow languages]
+does a pretty good job of introducing the dataflow concept. Perhaps the most interesting point I'd like to
+focus on here is the notion that "data is what it is all about". Even though data is an integral
+part of C++, and lot of things are very much about the data, programs tend not to be modeled with the
+flow of data as the central representation mechanism.
+
+Take the following example - a simple real-time camera-input-displayed-on-the-screen
+application. Suppose there are three parts to the application - getting each image frame from the camera,
+processing the image in some way, and displaying it on the screen. A program that does it might
+be structured as follows:
+
+[$dataflow1.png]
+
+Basically, the main program loop is a series of instructions which does this particular job.
+If you wanted to be a little bit more object oriented, you could encapsulate all this functionality
+into an Image class and just call the methods that do the right thing from the main program loop.
+But that's still not all about the flow of data. It's about the instructions that work on the data.
+
+Let's take this a step further. Video input libraries often provide callback functionality which will
+deliver a video stream as image frames at the appropriate frame rate. With this in mind, we do the following
+
+# implement a function which takes an image as input.
+ # the function first invokes the image processing library function that modifies the image as appropriate
+ # the function then invokes the GUI library function that displays the image
+# register the function as a callback with the camera library
+# relax and have some coffee.
+
+The situation now looks something like this:
+
+[$dataflow2.png]
+
+OK, let's look at the situation now. The image library is acting as some sort of a signal generator - it
+generates images at a certain frame rate. And the function we implemented, that seems to be like
+a signal consumer which can take an image, process it, and display it on the screen.
+
+This does seem to be a little more about the flow of data.
+But let's take it even further, and go into the realm of the atypical. Right now
+we have two "components" - one image signal generator and one signal consumer. How about this:
+
+# implement a component which accepts an input image signal, modifies the image as appropriate, and then outputs
+a signal with the modified image
+# implement a component which receives an imput image signal and displays it on the screen
+# connect the camera library input stream to the first component
+# connect the first component to the second component
+# relax and have some tea. go take a nap.
+
+The big picture now looks like the following:
+
+[$dataflow3.png]
+
+[*["So what did we gain?]]
+
+First, maintenance of the program has just become very intuitive. You don't
+want to process the image any more? Connect the camera signal directly to the screen display and cut out
+the image processing component. Someone gives you a new video signal generator component you'd like to use as input
+instead of the camera? Just plug it in.
+
+Second, the program can now be divided between threads, processors, or computers more easily.
+The display is on a different computer? No problem, just put the connection to it through a network socket.
+With the data flow clearly specified, it is much easier to distribute the work either manually or
+even automatically (although the Signal Network library at the moment offers no such automatic functionality).
+
+Third, we are not to far from the advantages of a [@http://en.wikipedia.org/wiki/Visual_programming_language
+visual programming language], since the components and the connections have a natural graphical representation.
+With a visaul development environment, programming becomes as easy as connecting components with connections
+(again, the Signal Network library provides no visual programming functionality).
+
+[*["I still don't get it. I can do all of this using my favorite non-dataflow programming approach just the same!]]
+
+Sure. Maybe you can. But if the application is really about the flow of data, why not
+model it and implement it that way? If it's about the data signals and the components that process it,
+rather than about the sequence of instructions that needs to be executed, then the dataflowimplementation can reflect
+the application more closely, and it just might be easier to design and maintain.
+
+[h4 Signal-based approach and pin-based approach]
+
+To explore the concept of dataflow in C++ further, let us take a step back and examine where the flow of data
+happens in C++. Rather informally, we can divide things as follows:
+
+* on one hand, there is /data/ (variables, objects, etc...)
+* on the other, there are /computational components/ (functions, methods, etc...)
+
+Data can then be processed by the computational
+components by applying the components to the data in some appropriate way.
+There are several ways of providing data to the computational components:
+
+* by placing it in a location where the component will read it
+* by passing it as a parameter in a call
+* (a combination of the above) by passing the location of the data as a parameter in a call
+
+Similarly, there are several ways of getting data out of a computation component
+
+* the component makes a function call that carries the data as a parameter
+* the component places a value somewhere where it can be read
+* the component returns it as a return value
+
+There is a separation between providing the data to a component, and invoking the
+component. In some cases, the two happen simoultaneously (when the data is passed and returned
+via a function call), while in others invoking the computational component
+can happen separately from providing the data (at least from a modeling perspective).
+An example of the latter is a computational component which uses data stored in a particular location.
+We can place the data in that location much before invoking the computational component.
+
+The Signal Network library relies on moving the data via function parameters and return values.
+Here, the Boost.Signals library is used to model these individual data channels which couple
+the data transfer and the computational component invocation. This is one possible dataflow-oriented
+approach.
+
+There is another approach, proposed by Tobias Schwinger, in which the computational components are
+connected by "pins". Here, the data is communicated by
+placing it in locations where the components will read it, and reading it
+from locations where the components write them. Also, rather than the components
+activating each other, the network itself activates the components manually in an optimized
+order/way.
+
+Each of these approaches has different properties. In the signal-based approach, the knowledge of the
+network is local - each component knows about where its signals are going, but it knows nothing
+of where the signals arriving at its own slots are coming from. Unless we record how the network was
+constructed, there is no "big picture" of what the complete network looks like. Similarly,
+the network is executed autonomously - the components invoke one another when appropriate, and
+no external control mechanism is required.
+
+In the pin-based approach, the situation is reversed. There is a "big picture" of what the complete
+network looks like, and the network control mechanism uses this information to decide when a component
+should be invoked and to manage the data shared between the components via pins. Global
+knowledge of the network can be used for better optimization, serialization, etc. However, it may
+come at the price of some intrusiveness to the computation components.
+
+[heading What's happening here for Google Summer of Code?]
+
+Even though these the signal-based approach and pin-based approach are sufficiently different, they aim for the same goal:
+a dataflow-oriented approach using the C++ language. It is possible that an application
+designed in a dataflow-oriented way could be implemented using either of the approaches,
+that one approaches could be convertible to the other, or that using both approaches
+simoultaneously is in fact the best solution. Even though investigating the relationships
+between these two frameworks, or implementing both, would be outside the scope of this
+Google Summer of Code project, I believe it is worthwhile to keep the connections in
+mind while designing and implementing the Signal Network library.
+
+For example, both frameworks could possibly benefit from the separation of the network
+creation layer (which may include factories and reflection) from the network execution
+layer (which only includes the necessary computation components). Also, allowing additional
+mechanisms for network creation such as through a visual GUI designer, serialization/deserialization
+etc. would also be beneficial. If I address any of these for the GSoC project, I will try to
+address them in a way that might be useful for both the signal-based approach and pin-based approach.
+
+[endsect]
+
+[section:use When to use]
+
+While the [link signal_network.introduction.dataflow dataflow] section hopefully convinced you
+that there are circumstances in which a dataflow approach is useful, please keep in mind that
+there are many circumstances in which this is not the case.
+
+First, a dataflow approach really only makes sense when the underlying task is
+really about the flow of data through the components that process it. If you can't sketch a concise
+data flow diagram which truly represents the application, the dataflow approach might not be the best option.
+For example, if you are implementing a complicated algorithm which is really about the sequence of
+instructions that need to be executed on the data (rather than the data going through well-defined and
+self-contained processing components), you probably should't use the Signal Network library.
+If you are working on an audio or video processing application, maybe you should.
+
+Second, using signals as the underlying data transport mechanism makes the Signal Network library
+inherently a run-time contraption. Every signal sent results in a function call, and if the processing
+components are so minute that the cost of the function calls overtakes the cost of the processing,
+using the Signal Network library will cause a significant performance hit.
+
+To sum up, consider using the Signal Network library when:
+
+* The application can be modeled well through the flow of data; and
+* The cost of the processing shadows the cost of the function calls that transport the data.
+
+[endsect]
+
+[section:fusion Signal Network and Boost.Fusion]
+The components in the Signal Network library are implemented using __fusion__. To use the
+Signal Network library, you might benefit from the following if you're not familiar with fusion.
+
+[heading Fused vs. unfused]
+A simple C++ function object might look something like this:
+
+ struct f
+ {
+ int operator()(int arg1, int &arg2, const std::string &arg3)
+ {
+ ...
+ }
+ }
+
+The thing to note here is that there are three arguments (of types `int`, `int &`, and `const std::string &`
+respectively), and that when the function object is invoked, they are passed separately:
+
+ int x;
+ std::string s;
+ f()(1, x, s);
+
+In the terminology of __fusion__, this function object is /unfused/. This is in contrast to a /fused/
+fuction object, which might look like this:
+
+ struct fused_f
+ {
+ int operator()(fusion::vector<int, int &, const std::string &> &args)
+ {
+ ...
+ }
+ }
+
+Basically, the difference is that the three arguments from the unfused version are now sent in a single
+fusion container. The benefit is that no matter how many "unfused" arguments there are, there is
+always a single "fused" argument. Hence, writing templates that deal with a variable number of arguments
+becomes a lot simpler.
+
+[heading Signal Network provides both fused and unfused components]
+
+While writing the generic components provided in the Signal Network library benefits from using
+__fusion__, your particular use case might not. For this reason, every component provided
+by the Signal Network library has both a fused and an unfused version. The unfused
+component type is always accessible through the `::unfused` typedef of each component
+(which is fused by default)
+
+For example,
+
+ signet::storage<int (int, int &, const std::string &>)> fused_storage;
+ signet::storage<int (int, int &, const std::string &>)>::unfused unfused_storage;
+
+In the above case, `fused_storage` acts as a function object similar to `fused_f` above.
+Hence, it can be used as a slot for signals which carry a fusion container as an argument.
+On the other hand, `unfused_storage` is similar to `f` above, and can be used as a slot
+for signals which carry regular, unfused arguments.
+
+In general, the difference between the fused and unfused components are as follows:
+
+[table Fused vs. Unfused differences
+ [[trait][fused][unfused]]
+ [[signals receivable][receives only fused signals][receives both fused and unfused signals]]
+ [[signals sent][sends fused signals by default][sends unfused signals by default]]
+]
+
+[endsect][/fusion]
+
+[section:namespace Namespace use]
+
+The connection operators (and a few other things) are located in the boost::signal_network namespace.
+All of the components are in the boost::signal_network::signet namespace.
+
+It is recommended that you do
+
+ using namespace boost::signal_network
+
+so that your code can use the operators >>= and |, and you can access the components via signet::/component/.
+
+Otherwise, the following might be helpful:
+
+ namespace signet = boost::signal_network::signet;
+
+[endsect]
+
+[section:start Quick Start]
+
+[note You may want to read the [link signal_network.introduction.namespace Namespace Use] and
+[link signal_network.introduction.fusion Signal Network and Boost.Fusion] sections first.]
+
+The Sigal Network library provides many common building block components for a
+signal network. The most basic is __storage__, which
+can be used to store a value received through a signal, send it on, and/or retreive it.
+
+By default, components in the library use operator() to receive a signal.
+For example, __storage__ objects can receive
+signals through [memberref boost::signal_network::signet::storage::operator()(void) operator()()].
+Upon receiving this signal, they will output their stored value through another signal.
+
+The value stored inside a __storage__ object
+can be retrieved via the [memberref boost::signal_network::signet::storage::at() at()] method.
+
+Using a few __storage__ objects, it is easy to
+create a network using [funcref boost::signal_network::operator>>=() operator>>=]:
+
+[table storage class use example
+ [[fused][unfused]]
+ [[[test_storage_fused]][[test_storage_unfused]]]
+]
+
+[heading Creating your own signal receiver (slot)]
+
+The easiest way to create your own signal receiver which can be used with the Signal Network
+library is to create a class with `operator()` of the signal signature you wish to receive.
+
+For example, consider the signature `void()`. This is the signature
+of a function that returns void and takes no arguments.
+A class that can receive signals of such a signature would be
+defined as follows:
+
+ class SignalVoidCounter
+ #ifdef SIGNAL_NETWORK_TRACKABLE
+ // Two base signals implementations are supported currently
+ // (Boost.Signals by Doug Gregor and the
+ // thread_safe_signals version under implementation by Frank Mori Hess).
+ // SIGNAL_NETWORK_TRACKABLE is defined if you are using Boost.Signals
+ // - in this case, we want to make our component trackable so that
+ // it gets disconnected automatically when this object is destroyed.
+ : public boost::signals::trackable
+ #endif
+ {
+ volatile int cnt;
+ public:
+ SignalVoidCounter() : cnt(0) {}
+ void operator()()
+ {
+ cnt++; // whenever a void() signal is received, increase the counter
+ }
+ int GetCount()
+ {
+ return cnt;
+ }
+ }; // end class SignalVoidCounter
+
+The above class does something really simple - it receives signals of signature `void()`, and counts
+how many it has received. While this functionality is actually covered by the library component __counter__,
+it's a good introductory example.
+
+If you read the section about [link signal_network.introduction.fusion Boost.Fusion], you will find out that the Signal Network
+library works with both /fused/ and /unfused/ signals. If you wanted the above to work with fused signals,
+all you would need to do is add or substitute the following `operator()`:
+
+ void operator()(const fusion::vector<> &)
+ {
+ cnt++; // whenever a void() signal is received, increase the counter
+ }
+
+You can now introduce this component into a signal network:
+
+[table storage class use example
+ [[fused][unfused]]
+ [[``
+ SignalVoidCounter counter;
+ signet::storage<void()> storage;
+
+ storage >>= counter;
+ for (int i=0; i<33; i++)
+ storage();
+
+ assert(counter.GetCount());
+ ``][``
+ SignalVoidCounter counter;
+ signet::storage<void()>::unfused storage;
+
+ storage >>= counter;
+ for (int i=0; i<33; i++)
+ storage();
+
+ assert(counter.GetCount());
+ ``]]
+]
+
+To proceed, you may want to look at
+
+* Provided Signal Network library [link signal_network.components components].
+* Creating your own in/out components using the __filter__ class.
+* Using the [link signal_network.connections connection operators] to make connections.
+
+[endsect][/start]
+
+[endsect][/introduction]

Modified: sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network.qbk 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,128 +1,69 @@
-
-[library Signal Network
- [quickbook 1.4]
- [version 0.1]
- [authors [Rajko, Stjepan]]
- [copyright 2007 Stjepan Rajko]
- [purpose Operators and Components for signal-based networks.]
- [license
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- [@http://www.boost.org/LICENSE_1_0.txt])
- ]
-]
-
-The Signal Network library aims to facilitate the
-implementation and interconnection of objects into signal networks using Boost.Signals.
-To see the rationale behind the Signal Network library, please visit the associated
-[@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork GSoC page].
-
-[warning Signal Network is not an official Boost library. It is being developed
-as a part of Google Summer of Code program.]
-
-* If you would like some more information about why one would want to connect objects into a signal-based
- network, read my exploration of [link signal_network.dataflow Dataflow-oriented programming approaches in C++].
-* If you are interested in the progress of the implementation, see
- * [link signal_network.discussion Discussion on Boost Community Feedback]
+[library Signal Network
+ [quickbook 1.4]
+ [version 0.1]
+ [authors [Rajko, Stjepan]]
+ [copyright 2007 Stjepan Rajko]
+ [purpose Operators and Components for signal-based networks.]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[def __filter__ [link signal_network.components.generic.filter filter]]
+[def __applicator__ [link signal_network.components.generic.applicator applicator]]
+[def __conditional__ [link signal_network.components.generic.conditional conditional]]
+[def __instantiator__ [link signal_network.components.generic.instantiator instantiator]]
+[def __modifier__ [link signal_network.components.generic.modifier modifier]]
+[def __storage__ [link signal_network.components.properties.storage storage]]
+[def __counter__ [link signal_network.components.properties.counter counter]]
+[def __junction__ [link signal_network.components.flow.junction junction]]
+[def __mutex__ [link signal_network.components.flow.mutex mutex]]
+[def __function__ [link signal_network.components.adapters.function function]]
+[def __socket_sender__ [link signal_network.components.network.socket_sender socket_sender]]
+[def __socket_receiver__ [link signal_network.components.network.socket_receiver socket_receiver]]
+[def __chain__ [link signal_network.components.topologies.chain chain]]
+
+[def __fusion__ [@http://spirit.sourceforge.net/dl_more/fusion_v2/libs/fusion/doc/html/index.html Boost.Fusion]]
+
+[import ../test/test_storage.cpp]
+[import ../test/test_function.cpp]
+[import ../test/test_chain.cpp]
+[import ../test/test_socket.cpp]
+
+The Signal Network library aims to facilitate the
+implementation and interconnection of objects into signal networks using Boost.Signals.
+To see the rationale behind the Signal Network library, please visit the associated
+[@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork GSoC page].
+
+[warning Signal Network is not a part of the Boost libraries. It is being developed
+as a part of Google Summer of Code program.]
+
+* If you would like some more information about why one would want to connect objects into a signal-based
+ network, read my exploration of [link signal_network.introduction.dataflow Dataflow-oriented programming approaches in C++].
+* If you'd like to try out the library
+ * keep in mind that the interface is highly unstable at this point
+ * see the [link signal_network.introduction.start Quick Start] section.
+* If you are interested in the progress of the implementation, see
+ * News section of the [@http://svn.boost.org/trac/boost/wiki/soc/2007/SignalNetwork Signal Network GSoC page]
+ * [link signal_network.discussion Discussion on Boost Community Feedback]
     * [link signal_network.download Download and Changelog]
- * [@doxygen/index.html Tutorial and Reference]
-
-[section:dataflow Dataflow-oriented programming approaches in C++]
-
-[note The purpose of this section is to place the Signal Network library in the bigger picture.
-It is only a start, so please forgive the incompleteness, possible inaccuracies,
-and the present lack of a real "point" to the section. A
-lot of the ideas in this section have come from a discussion with Tobias Schwinger.]
-
-The Signal Network library attempts to afford some of the benefits of
-[@http://en.wikipedia.org/wiki/Dataflow_language Dataflow languages] to C++. It does so by
-facilitating large-scale use of Boost.Signals as a mechanism to model the transfer
-of data between processing components.
-
-To explore this further, let us take a step back and (rather informally) divide things as follows:
-
-* on one hand, there is /data/ (variables, objects, etc...)
-* on the other, there are /computational components/ (functions, methods, etc...)
-
-Development of C++ programs is usually focused on the development of the computational
-components. Data can then be processed by the computational
-components by applying the components to the data in some appropriate way.
-There are several ways of providing data to the computational components:
-
-* by placing it in a location where the component will read it
-* by passing it as a parameter in a call
-* (a combination of the above) by passing the location of the data as a parameter in a call
-
-Similarly, there are several ways of getting data out of a computation component
-
-* the component makes a function / signal call that carries the data as a parameter
-* the component places a value somewhere where it can be read
-* the component returns it as a return value
-
-Please note that there is a separation between providing the data to a component, and invoking the
-component. In some cases, the two happen simoultaneously (when the data is passed and returned
-via a function call), while in others invoking the computational component
-can happen separately from providing the data (at least from a modeling perspective).
-An example of the latter is a computational component which uses data stored in a particular location.
-We can place the data in that location much before invoking the computational component.
-
-[h4 Signal-based approach and pin-based approach]
-
-The Signal Network library relies on moving the data via function parameters and return values.
-Here, the Boost.Signals library is used to model these individual data channels which couple
-the data transfer and the computational component invocation. This is one possible dataflow-oriented
-approach.
-
-There is another approach, proposed by Tobias Schwinger, in which the computational components are
-connected by "pins". Here, the data is communicated by
-placing it in locations where the components will read it, and reading it
-from locations where the components write them. Also, rather than the components
-activating each other, the network itself activates the components manually in an optimized
-order/way.
-
-Each of these approaches has different properties. In the signal-based approach, the knowledge of the
-network is local - each component knows about where its signals are going, but it knows nothing
-of where the signals arriving at its own slots are coming from. Unless we record how the network was
-constructed, there is no "big picture" of what the complete network looks like. Similarly,
-the network is executed autonomously - the components invoke one another when appropriate, and
-no external control mechanism is required.
-
-In the pin-based approach, the situation is reversed. There is a "big picture" of what the complete
-network looks like, and the network control mechanism uses this information to decide when a component
-should be invoked and to manage the data shared between the components via pins. Global
-knowledge of the network can be used for better optimization, serialization, etc. However, it may
-come at the price of some intrusiveness to the computation components.
-
-Even though these two frameworks are sufficiently different, they aim for the same goal:
-a dataflow-oriented approach using the C++ language. It is possible that an application
-designed in a dataflow-oriented way could be implemented using either of the frameworks,
-that one framework could be convertible to the other, or that using both frameworks
-simoultaneously is in fact the best solution. Even though investigating the relationships
-between these two frameworks, or implementing both, would be outside the scope of this
-Google Summer of Code project, I believe it is worthwhile to keep the connections in
-mind while designing and implementing the Signal Network library.
-
-For example, both frameworks could possibly benefit from the separation of the network
-creation layer (which may include factories and reflection) from the network execution
-layer (which only includes the necessary computation components). Also, allowing additional
-mechanisms for network creation such as through a visual GUI designer, serialization/deserialization
-etc. would also be beneficial. If I address any of these for the GSoC project, I will try to
-address them in a way that might be useful for both frameworks.
-
-[endsect]
-
-[section:discussion Discussion on Boost Community Feedback]
-
-The following summarizes some of the suggestions / comments given by the Boost community, and
-what has been done to incorporate this feedback.
-
+
+[include introduction.qbk]
+
+[section:discussion Discussion on Boost Community Feedback]
+
+The following summarizes some of the suggestions / comments given by the Boost community, and
+what has been done to incorporate this feedback.
+
 [* Tobias Schwinger indicated that the library could be used for pulling rather than pushing data.]
 
-* [@doxygen/index.html#signal_network_pull_example An example] which illustrates this has been addded.
+* [link signal_network.connections.pull An example] which illustrates this has been addded.
 
 [* James Jones suggested that a ||-like operator could be used for branching, and >> for chaining.]
 
-* operator >= which was orignally used for branching has been replaced with operator |.
+* `operator >=` which was orignally used for branching has been replaced with `operator |`.
 * Since the most straightforward way for me to implement chaining/branching is using a left-to-right
 operator for one and a right-to-left operator for the other, I decided to stay with >>= as the chaining
 operator.
@@ -130,38 +71,35 @@
 [* Paolo Coletta suggested a "video_generator >>= ( effect1 && effect2 ) >>= image_sum" - like syntax that
   would allow parallel processing of signals (identified as the "join" pattern by Yigong Liu)]
 
-* I have started to implement thread-related components in
-[@doxygen/classboost_1_1signal__network_1_1signet_1_1timed__generator.html signet::timed_generator] and
-[@doxygen/classboost_1_1signal__network_1_1signet_1_1mutex.html signet::mutex].
+* I have started to implement thread-related components in __timed_generator__ and __mutex__.
 More sophisticated threading components, control and syntax to follow.
 
 [* Yigong Liu suggested enhanced support for common network topologies, such as mesh. ]
 
 * I have implemented a prototype
-[@doxygen/classboost_1_1signal__network_1_1signet_1_1chain.html signet::chain] topology
+__chain__ topology
 to get a start on this concept.
 
 [* Braddock Gaskill pointed out the relationship with the "pipes and filters" pattern, and suggested
    the possibility of using functions as filters. He also suggested the library would me more useful
- if different functions executed in parallel threads, or were queued to specific worker threads,
- if the library would provide functionality to control and schedule the execution of the invoked functions,
+ if different functions executed in parallel threads, or were queued to specific worker threads,
+ if the library would provide functionality to control and schedule the execution of the invoked functions,
    or traverse the call graph.]
 
 * In light of the possible connection with the "pipes and filters" pattern, the base
   object for signal network components which receive a signal and send a signal has
- been changed to
- [@doxygen/classboost_1_1signal__network_1_1signet_1_1filter.html signet::filter].
+ been changed to __filter__.
   I was not successful in finding a formal definition
   of what "pipes and filters" semantics should be, so I am not sure whether this is appropriate.
-* [@doxygen/classboost_1_1signal__network_1_1signet_1_1function.html signet::function]
+* __function__
   now offers the proposed functionality of converting functions into filters.
 * Threading and scheduling of the invoked functions is something I plan to address.
 * Providing a call graph would be a great feature, but I am not sure what the best
   way to address that is, since each component might be of a different type. Perhaps a graph
   in which only the edges are labeled (with connection objects) would be doable and useful.
-
-[endsect]
-
+
+[endsect]
+
 [section:download Download and Changelog]
 
 Please keep in mind that this code is a prototype and far from the finished product. I am learning
@@ -187,30 +125,30 @@
 Original request for interest version available as attachment to
 [@http://lists.boost.org/Archives/boost/2007/02/116869.php]
 
-[endsect]
-
-[section:reference Reference]
-
-The reference for this library is [@doxygen/index.html generated separately].
-
-[endsect]
-
-[section:acknowledgements Acknowledgements]
-
-* Thanks to all the members of the Boost community who have expressed an interest in this library
- and contributed [link signal_network.discussion valuable feedback].
-* Thanks to Douglas Gregor for making himself available as a mentor for this project.
-* Thanks to Tobias Schwinger for a most valuable discussion on various [link signal_network.dataflow
- dataflow-oriented approaches and ideas].
-
-[endsect]
-
-[section:license License]
-
-Copyright 2007 Stjepan Rajko.
-Distributed under the Boost Software License, Version 1.0. (See
-accompanying file LICENSE_1_0.txt or copy at
-[@http://www.boost.org/LICENSE_1_0.txt])
-
-
+[endsect]
+
+[include connections.qbk]
+
+[include components.qbk]
+
+[xinclude signal_network_doxygen.xml]
+
+[section:acknowledgements Acknowledgements]
+
+* Thanks to all the members of the Boost community who have expressed an interest in this library
+ and contributed [link signal_network.discussion valuable feedback].
+* Thanks to Douglas Gregor for making himself available as a mentor for this project.
+* Thanks to Tobias Schwinger for a most valuable discussion on various [link signal_network.introduction.dataflow
+ dataflow-oriented approaches and ideas].
+
+[endsect]
+
+[section:license License]
+
+Copyright 2007 Stjepan Rajko.
+Distributed under the Boost Software License, Version 1.0. (See
+accompanying file LICENSE_1_0.txt or copy at
+[@http://www.boost.org/LICENSE_1_0.txt])
+
+
 [endsect]
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network_doxygen.xml
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network_doxygen.xml (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/doc/signal_network_doxygen.xml 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,15 +1,24 @@
 <?xml version="1.0" standalone="yes"?>
-<library-reference><header name="boost/signal_network/base.hpp"><namespace name="boost"><namespace name="signal_network"><struct name="slot_selector_t"><template>
+<library-reference><header name="boost/signal_network/applicator.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="applicator"><template>
+ <template-type-parameter name="Application"/>
+ <template-type-parameter name="Member"/>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><method-group name="public member functions"><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="seq"><paramtype>const Seq &amp;</paramtype></parameter><description><para>Applies an instance of Application to the Member object. </para></description></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/base.hpp"><namespace name="boost"><namespace name="signal_network"><struct name="slot_selector_t"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="Signature"/>
     </template><data-member name="link"><type>T &amp;</type></data-member><data-member name="func"><type><emphasis>unspecified</emphasis></type></data-member><method-group name="public member functions"><method name="conversion-operator" cv=""><type>T &amp;</type></method></method-group><constructor><parameter name="link"><paramtype>T &amp;</paramtype></parameter><parameter name="func"><paramtype><emphasis>unspecified</emphasis></paramtype></parameter></constructor></struct><namespace name="signet"><class name="filter_base"/></namespace><function name="slot_selector"><type>slot_selector_t&lt; T, Signature &gt;</type><template>
           <template-type-parameter name="Signature"/>
           <template-type-parameter name="T"/>
- </template><parameter name="link"><paramtype>T &amp;</paramtype></parameter><parameter name="func"><paramtype><emphasis>unspecified</emphasis></paramtype></parameter><purpose>Allows functions other than operator() to serve as signet::filter slots. </purpose><description><para><para>signet::filter for an example </para>
-</para></description></function><function name="operator&gt;&gt;="><type>boost::enable_if&lt; boost::is_base_of&lt; signet::filter_base, Filter &gt;, Filter &amp; &gt;::type</type><template>
+ </template><parameter name="link"><paramtype>T &amp;</paramtype></parameter><parameter name="func"><paramtype><emphasis>unspecified</emphasis></paramtype></parameter><purpose>Allows functions other than operator() to serve as signet::filter slots. </purpose></function><function name="operator&gt;&gt;="><type>boost::enable_if&lt; boost::is_base_of&lt; signet::filter_base, Filter &gt;, Filter &amp; &gt;::type</type><template>
           <template-type-parameter name="Filter"/>
           <template-type-parameter name="T"/>
- </template><parameter name="filter"><paramtype>Filter &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter><purpose>Connects a sequence of components using signals. </purpose><description><para>This operator is identical to signet::filter::operator&gt;= (it connects the left component to the right component, and returns a reference to the left component), except it is evaluated right to left. This makes it semantics more suitable for connecting a chain of connections. </para></description></function><function name="operator|"><type>boost::enable_if&lt; boost::is_base_of&lt; signet::filter_base, Filter &gt;, Filter &amp; &gt;::type</type><template>
+ </template><parameter name="filter"><paramtype>Filter &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter><purpose>Connects a sequence of components using signals. </purpose><description><para>This operator is identical to signet::filter::operator| (it connects the left component to the right component, and returns a reference to the left component), except it is evaluated right to left. This makes it semantics more suitable for connecting a chain of connections. </para></description></function><function name="operator|"><type>boost::enable_if&lt; boost::is_base_of&lt; signet::filter_base, Filter &gt;, Filter &amp; &gt;::type</type><template>
           <template-type-parameter name="Filter"/>
           <template-type-parameter name="T"/>
         </template><parameter name="filter"><paramtype>Filter &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter><purpose>Allows branching in a component connection sequence. </purpose><description><para>This operator is identical to signet::filter::operator&gt;&gt;=, (it connects the left component to the right component, and returns a reference to the left component) except it is evaluated left to right. This makes its semantics more suitable for branching connections. </para></description></function><function name="operator&gt;&gt;="><type>boost::enable_if&lt; boost::is_base_of&lt; signet::filter_base, Filter &gt;, Filter &amp; &gt;::type</type><template>
@@ -24,375 +33,148 @@
         </template><parameter name="filter"><paramtype>Filter &amp;</paramtype></parameter><parameter name="link"><paramtype>slot_selector_t&lt; T, Signature &gt;</paramtype></parameter><purpose>Allows slot functions other than operator() to be used with branching. </purpose><description><para><para>slot_selector() </para>
 </para></description></function><function name="operator&gt;&gt;="><type>boost::signal&lt; Signature &gt; &amp;</type><template>
           <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Combiner"/>
+ <template-type-parameter name="Group"/>
+ <template-type-parameter name="GroupCompare"/>
           <template-type-parameter name="T"/>
         </template><parameter name="signal"><paramtype>boost::signal&lt; Signature &gt; &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter></function><function name="operator&gt;="><type>boost::signal&lt; Signature &gt; &amp;</type><template>
           <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Combiner"/>
+ <template-type-parameter name="Group"/>
+ <template-type-parameter name="GroupCompare"/>
           <template-type-parameter name="T"/>
- </template><parameter name="signal"><paramtype>boost::signal&lt; Signature &gt; &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter></function></namespace></namespace><macro name="SIGNAL_NETWORK_TRACKABLE"/><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_NO_RETURNS"/><macro name="SIGNAL_NETWORK_TEMPLATE_TYPENAME_T"/><macro name="SIGNAL_NETWORK_TEMPLATE_DETAIL"/><macro name="SIGNAL_NETWORK_TEMPLATE_NO_MAIN_CLASS"/></header><header name="boost/signal_network/chain.hpp"><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_BASE"/><macro name="SIGNAL_NETWORK_TEMPLATE_TYPENAME_T"/></header><header name="boost/signal_network/chain.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="chain"><template>
+ </template><parameter name="signal"><paramtype>boost::signal&lt; Signature &gt; &amp;</paramtype></parameter><parameter name="link"><paramtype>T &amp;</paramtype></parameter></function></namespace></namespace><macro name="SIGNAL_NETWORK_TRACKABLE"/><macro name="SIGNAL_NETWORK_OPEN_SIGNAL_NETWORK_NAMESPACE"/><macro name="SIGNAL_NETWORK_CLOSE_SIGNAL_NETWORK_NAMESPACE"/><macro name="SIGNAL_NETWORK_OPEN_SIGNET_NAMESPACE"/><macro name="SIGNAL_NETWORK_CLOSE_SIGNET_NAMESPACE"/></header><header name="boost/signal_network/chain.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="chain"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="Signature"/>
     </template><purpose>Connects a number of components of the same type in a chain. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void chain_test()
-{
- signet::chain&lt;DoublerClass, void(float)&gt; doubling_chain(4);
- signet::storage&lt;void (float)&gt; floater(1.0f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- floater &gt;&gt;= doubling_chain &gt;&gt;= collector;
- floater();
-
- BOOST_CHECK(collector.value1() == 16.0f);
-} // end void chain_test
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="operator()" cv=""><type/><parameter name=""><paramtype>...</paramtype></parameter><purpose>Sending a signal to the chain will forward it to the first component in the chain. </purpose></method><method name="default_signal" cv=""><type>boost::signal&lt; Signature &gt; &amp;</type><purpose>The default signal coming out of the chain is the default signal of the last component in the chain. </purpose></method></method-group><constructor><parameter name="copies"><paramtype>size_t</paramtype></parameter><purpose>Constructs a chain composed of instances of T. </purpose></constructor><constructor><parameter name="copies"><paramtype>size_t</paramtype></parameter><parameter name="component"><paramtype>T &amp;</paramtype></parameter><purpose>Constructs a chain composed of copies of component. </purpose></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/collector.hpp"><namespace name="boost
"><namespace name="signal_network"><namespace name="signet"><class name="collector"><template>
- <template-type-parameter name="Signature"/>
- </template><purpose>Stores data received via a signal so that it can be retrieved. </purpose><description><para>
-Todo<para>Currently collector only supports signatures of type void (type).</para>Example: <programlisting>void simple_test()
-{
- // instantiate all of the components we need
- signet::storage&lt;void ()&gt; banger;
- signet::storage&lt;void (float)&gt; floater(2.5f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- // create the network
- banger &gt;&gt;= floater &gt;&gt;= collector;
-
- banger(); // signal from banger will now cause floater to output 2.5
- BOOST_CHECK(collector.value1() == 2.5f);
-
- floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
- BOOST_CHECK(collector.value1() == 1.5f);
-} // end void simple_test()
-</programlisting> </para></description><typedef name="arg1_value_type"><purpose>Type of the stored value. </purpose><type>boost::remove_reference&lt; typename boost::function_traits&lt; Signature &gt;::arg1_type &gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><parameter name="arg1"><paramtype>typename boost::function_traits&lt; Signature &gt;::arg1_type</paramtype></parameter><purpose>Stores the value in the signal. </purpose></method><method name="operator()" cv=""><type>call_traits&lt; arg1_value_type &gt;::const_reference</type><purpose>Returns the last stored value. </purpose></method></method-group><constructor><purpose>The default constructor will not initialize the stored value. </purpose></constructor><constructor><parameter name="init"><paramtype>typename boost::call_traits&lt; arg1_value_type &gt;::param_type</paramtype></parameter><purpose>This constructor will initialize the stored value to what is provided. </purpose></con
structor></class></namespace></namespace></namespace></header><header name="boost/signal_network/filter.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="filter"><template>
- <template-type-parameter name="Signature"/>
- </template><purpose>Provides a basis for filters (components that receive and send a signal). </purpose><description><para>
-Use this class as a base class for classes that produce a signal of a particular signature.</para><para>Example:<para> <programlisting>class DoublerClass : public signet::filter&lt;void (float)&gt;
-{
-public:
- void operator()(float x) {out(2*x);}
-};
-
-void filter_test()
-{
- DoublerClass doubler1, doubler2;
- signet::storage&lt;void (float)&gt; floater(1.0f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- floater &gt;&gt;= doubler1 &gt;&gt;= doubler2 &gt;&gt;= collector;
- floater();
-
- BOOST_CHECK(collector.value1() == 4.0f);
-} // end void filter_test()
-</programlisting> </para>
-</para></description><typedef name="signature_type"><type>Signature</type></typedef><typedef name="signal_type"><type>boost::signal&lt; Signature &gt;</type></typedef><typedef name="result_type"><type>boost::function_traits&lt; Signature &gt;::result_type</type></typedef><method-group name="public member functions"><method name="default_signal" cv=""><type>signal_type &amp;</type><purpose>Returns the default out signal. </purpose></method><method name="disconnect_all_slots" cv=""><type>void</type><purpose>Disconnects all slots connected to the signet::filter. </purpose></method></method-group><constructor><parameter name=""><paramtype>const <classname>filter</classname> &amp;</paramtype></parameter></constructor><copy-assignment><parameter name=""><paramtype>const <classname>filter</classname> &amp;</paramtype></parameter></copy-assignment><constructor/></class></namespace></namespace></namespace></header><header name="boost/signal_network/function.hpp"><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro na
me="SIGNAL_NETWORK_TEMPLATE_BASE"/><macro name="SIGNAL_NETWORK_TEMPLATE_NO_RETURNS"/></header><header name="boost/signal_network/function.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="function"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Converts a function into a Signal Network filter. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-The signet::function object will receive signals of signature void(function arguments), and send signals of signature void(function return type).</para><para>Example:<para> <programlisting>float DoublerFunc(float x)
-{
- return x*2;
-}
-
-void function_test()
-{
- signet::function&lt;float(float)&gt; double_fun1(&amp;DoublerFunc);
- signet::function&lt;float(float)&gt; double_fun2(&amp;DoublerFunc);
- signet::storage&lt;void (float)&gt; floater(1.0f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- floater &gt;&gt;= double_fun1 &gt;&gt;= double_fun2 &gt;&gt;= collector;
- floater();
-
- BOOST_CHECK(collector.value1() == 4.0f);
-} // end void function_test()
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><parameter name=""><paramtype>...</paramtype></parameter><description><para>Calls the function with the arguments of the signal, and then sends a signal with the return value of the function </para></description></method></method-group><constructor><parameter name="f"><paramtype>boost::function&lt; Signature &gt;</paramtype></parameter><purpose>Initializes the object with the specified function. </purpose></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/junction.hpp"><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_BASE"/></header><header name="boost/signal_network/junction.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="junction"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Forwards a single signal to multiple slots, and can also be disabled to stop the flow of signals. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void junction_test()
-{
- signet::storage&lt;void ()&gt; banger1, banger2;
- SignalVoidCounter counter1, counter2;
- signet::junction&lt;void ()&gt; junction;
-
- banger1 &gt;&gt;= junction &gt;&gt;= counter1;
- banger2 &gt;&gt;= junction &gt;&gt;= counter2;
-
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 2);
- BOOST_CHECK(counter2.GetCount() == 2);
-
- junction.disable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 2);
- BOOST_CHECK(counter2.GetCount() == 2);
-
- junction.enable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 4);
- BOOST_CHECK(counter2.GetCount() == 4);
-} // end void junction_test()
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="enable" cv=""><type>void</type><purpose>Enables the junction (signals will be forwarded). </purpose></method><method name="disable" cv=""><type>void</type><purpose>Disables the junction (signals will not be forwarded). </purpose></method><method name="operator()" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><parameter name=""><paramtype>...</paramtype></parameter><purpose>Upon receiving this signal, the same signal will be sent out if the junction is enabled. </purpose></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/mutex.hpp"><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_BASE"/></header><header name="boost/signal_network/mutex.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="mutex"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Ensures a component is processing only one signal at a time when using multiple threads. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void mutex_test()
-{
- signet::timed_generator&lt;void ()&gt; banger1;
- signet::timed_generator&lt;void ()&gt; banger2;
- signet::mutex&lt;void ()&gt; lock;
- SignalVoidCounter counter;
- ticker tick;
-
- banger1 &gt;&gt;= lock &gt;&gt;= counter;
- banger2 &gt;&gt;= lock &gt;&gt;= tick;
- banger1.enable(0.5, 5);
- banger2.enable(0.5, 5);
-
- while (counter.GetCount() &lt; 10) {}
-
- BOOST_CHECK(counter.GetCount() == 10);
- banger1.join();
- banger2.join();
-} // end void mutex_test
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="operator()" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><parameter name=""><paramtype>...</paramtype></parameter><purpose>Locks an internal mutex and forwards the signal. </purpose></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/selector.hpp"><macro name="SIGNAL_NETWORK_SELECTOR_INPUT" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="_arity"/></macro><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_BASE"/><macro name="SIGNAL_NETWORK_TEMPLATE_ITERATE2"/></header><header name="boost/signal_network/selector.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="selector"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Allows selection of signals from multiple inputs. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-This can be used to determine which signal out of a group of signals will continue through the selector (the others will not be forwarded).</para><para>Example:<para> <programlisting>void selector_test()
-{
- signet::storage&lt;void ()&gt; banger;
- signet::storage&lt;void (float)&gt; floater1, floater2;
- floater1(1.0f);
- floater2(2.0f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
- signet::selector&lt;2, void (float)&gt; selector;
-
- banger &gt;&gt;= floater1 &gt;&gt;= selector.slot1();
- banger &gt;&gt;= floater2 &gt;&gt;= selector.slot2();
- selector &gt;&gt;= collector;
-
- selector.select(0);
- banger();
- BOOST_CHECK(collector.value1() == 0.0f);
-
- selector.select(1);
- banger();
- BOOST_CHECK(collector.value1() == 1.0f);
-
- selector.select(2);
- banger();
- BOOST_CHECK(collector.value1() == 2.0f);
-} // end void selector_test()
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="select" cv=""><type>void</type><parameter name="input"><paramtype>int</paramtype></parameter><purpose>Selects the indicated input (if source is 0, no input will be selected). </purpose></method><method name="inputN" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><parameter name=""><paramtype>...</paramtype></parameter><purpose>If N is selected, the signal received at this slot will be forwared. </purpose></method><method name="slotN" cv=""><type>slot_selector_t&lt; <classname>selector</classname>, Signature &gt;</type><purpose>Returns the slot selector for inputN. </purpose></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/socket_receiver.hpp"><macro name="SIGNAL_NETWORK_SOCKET_UNPACK" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><m
acro name="SIGNAL_NETWORK_TEMPLATE_BASE"/></header><header name="boost/signal_network/socket_receiver.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="socket_receiver"><template>
- <template-type-parameter name="T"/>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::storage&lt; Signature &gt;</inherit><purpose>Receives serializable signals through a Boost asio socket. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read. </para>
-Todo<para>socket_sender only works for Signatures of return type void.</para>Example:<para> <programlisting>// asio test
-boost::mutex mutex_;
-boost::condition cond;
-asio::io_service io_service;
-
-// This function will set up an asio acceptor, and wait for a connection.
-// Once established, it will set up a signal network which will send
-// its final signal through the socket.
-void asio_server()
-{
- // set up the socket
- asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
- asio::ip::tcp::socket socket(io_service);
- {
- boost::mutex::scoped_lock lock(mutex_);
- acceptor.listen();
- cond.notify_all();
- }
- acceptor.accept(socket);
-
- // instantiate the components - a float generator, a filter that adds 2, and a sender
- signet::storage&lt;void (float)&gt; generator(1.0f);
- signet::function&lt;float(float)&gt; add2(boost::bind(std::plus&lt;float&gt;(), _1, 2.0f));
- signet::socket_sender&lt;void (float)&gt; sender(socket);
-
- // create the network
- generator &gt;&gt;= add2 &gt;&gt;= sender;
-
- // cause the generator to send it's stored value
- generator();
-}
-
-// main test function
-void asio_test()
-{
- // start the server in a separate thread
- boost::mutex::scoped_lock lock(mutex_);
- boost::thread t(asio_server);
- cond.wait(lock);
-
- // set up the socket
- asio::ip::tcp::endpoint endpoint_recv(asio::ip::address::from_string("127.0.0.1"), 1097);
- asio::ip::tcp::socket socket(io_service);
- socket.connect(endpoint_recv);
-
- // instatiate the components
- signet::socket_receiver&lt;void (float)&gt; receiver(socket);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- // set up the network
- receiver &gt;&gt;= collector;
-
- // this receiver is synchronous - we have to tell it to receive a signal
- receiver();
-
- BOOST_CHECK(collector.value1() == 3.0f);
-
- t.join();
-} // end void asio_test
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><purpose>Sets the receiver to wait for a packet and send its contents via the signal. </purpose></method></method-group><constructor><parameter name="socket"><paramtype>asio::ip::tcp::socket &amp;</paramtype></parameter><purpose>Initializes the socket_sender to use the provided socket. </purpose></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/socket_sender.hpp"><macro name="SIGNAL_NETWORK_SOCKET_PACK" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/></header><header name="boost/signal_network/socket_sender.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="socket_sender"><template>
- <template-type-parameter name="T"/>
+</para></description><struct name="result"><template>
+ <template-type-parameter name="Seq"/>
+ </template><typedef name="type"><type>boost::function_traits&lt; Signature &gt;::result_type</type></typedef></struct><typedef name="parameter_types"><type>boost::function_types::parameter_types&lt; Signature &gt;</type></typedef><typedef name="parameter_vector"><type>boost::fusion::result_of::as_vector&lt; parameter_types &gt;::type</type></typedef><typedef name="unfused"><type>boost::fusion::unfused_inherited&lt; <classname>chain</classname>&lt; T, Signature &gt;, typename mpl::vector&lt; size_t, T * &gt;::type, typename boost::function_types::parameter_types&lt; Signature &gt; &gt;</type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><parameter name="vec_par"><paramtype>const parameter_vector &amp;</paramtype></parameter><purpose>Sending a signal to the chain will forward it to the first component in the chain. </purpose></method><method name="default_signal" cv=""><type>T::signal_type &amp;</ty
pe><purpose>The default signal coming out of the chain is the default signal of the last component in the chain. </purpose></method></method-group><constructor><parameter name="copies"><paramtype>size_t</paramtype></parameter><parameter name="component"><paramtype>T *</paramtype><default>NULL</default></parameter><description><para>Constructs a chain composed of instances of T. Constructs a chain composed of copies of component. </para></description></constructor><destructor/><method-group name="private member functions"><method name="initialize" cv=""><type>void</type><parameter name="copies"><paramtype>size_t</paramtype></parameter><parameter name="component"><paramtype>T *</paramtype><default>NULL</default></parameter></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/conditional.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="conditional"><template>
+ <template-type-parameter name="Condition"/>
+ <template-type-parameter name="Member"/>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><purpose>Forwards an incoming signal if an specified condition evaluates to true. </purpose><struct name="result"><template>
+ <template-type-parameter name="Seq"/>
+ </template></struct><typedef name="unfused"><type>boost::fusion::unfused_inherited&lt; <classname>conditional</classname>&lt; Condition, Member, Signature, OutSignal, Combiner, Group, GroupCompare &gt;, typename mpl::vector&lt;&gt;::type, typename boost::function_types::parameter_types&lt; Signature &gt; &gt;</type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="vec_par"><paramtype>const Seq &amp;</paramtype></parameter><description><para>Forwards the signal if the condition evaluates the true.
+</para></description><returns><para>Return value of the sent signal if the condition evaluates to true, default constructed instance otherwise. </para></returns></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/counter.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="counter"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="T"><default>volatile int</default></template-type-parameter>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ <template-type-parameter name="Base"><default>applicator&lt;detail::postincrement&lt;T&gt;, T, Signature, OutSignal, Combiner, Group, GroupCompare&gt;</default></template-type-parameter>
+ </template><purpose>Counts the number of signals passing through the component. counter is an applicator with a postincrement application and default member of type volatile int. </purpose><description><para>
+</para></description><typedef name="unfused"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="reset" cv=""><type>void</type><description><para>Sets the internal counter to 0. </para></description></method><method name="count" cv="const"><type>boost::remove_volatile&lt; T &gt;::type</type><description><para>
+</para></description><returns><para>The internal signal counter. </para></returns></method></method-group><constructor><description><para>Initializes the internal counter to 0. </para></description></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/filter.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><struct name="combined_out_signal"><purpose>Provides a basis for filters (components that receive and send a signal). </purpose><description><para>
+Use this class as a base class for classes that produce a signal of a particular signature. </para></description><typedef name="default_normal_type"><type><classname>combined_out_signal</classname></type></typedef><typedef name="default_unfused_type"><type><classname>combined_out_signal</classname></type></typedef></struct><struct name="unfused_out_signal"><typedef name="default_normal_type"><type><classname>combined_out_signal</classname></type></typedef><typedef name="default_unfused_type"><type><classname>combined_out_signal</classname></type></typedef></struct><struct name="fused_out_signal"><typedef name="default_normal_type"><type>fused_out_signal</type></typedef><typedef name="default_unfused_type"><type>fused_out_signal</type></typedef></struct><struct name="default_out_signal"><typedef name="default_normal_type"><type>fused_out_signal</type></typedef><typedef name="default_unfused_type"><type><classname>combined_out_signal</classname></type></typedef></struct><class-specialization name="filter"><te
mplate>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Combiner"/>
+ <template-type-parameter name="Group"/>
+ <template-type-parameter name="GroupCompare"/>
+ </template><specialization><template-arg>Signature</template-arg><template-arg>unfused_out_signal</template-arg><template-arg>Combiner</template-arg><template-arg>Group</template-arg><template-arg>GroupCompare</template-arg></specialization><purpose>Unfused version of the filter class. </purpose><typedef name="signature_type"><type>Signature</type></typedef><typedef name="signal_type"><type>boost::signal&lt; Signature, Combiner, Group, GroupCompare &gt;</type></typedef><method-group name="public member functions"><method name="filter" cv=""><type/><parameter name=""><paramtype>const filter &amp;</paramtype></parameter></method><method name="filter" cv=""><type/></method><method name="default_signal" cv=""><type>signal_type &amp;</type><purpose>Returns the default out signal. </purpose></method><method name="disconnect_all_slots" cv=""><type>void</type><purpose>Disconnects all slots connected to the signet::filter. </purpose></method></method-group><copy-assignment><parameter name=""><paramtype>const fil
ter &amp;</paramtype></parameter></copy-assignment></class-specialization><class-specialization name="filter"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Combiner"/>
+ <template-type-parameter name="Group"/>
+ <template-type-parameter name="GroupCompare"/>
+ </template><specialization><template-arg>Signature</template-arg><template-arg>combined_out_signal</template-arg><template-arg>Combiner</template-arg><template-arg>Group</template-arg><template-arg>GroupCompare</template-arg></specialization><inherit access="public">boost::signal_network::signet::filter&lt; Signature, unfused_out_signal, Combiner, Group, GroupCompare &gt;</inherit><purpose>Combined version of the filter class. </purpose><typedef name="signature_type"><type>base_type::signature_type</type></typedef><typedef name="signal_type"><type>base_type::signal_type</type></typedef><typedef name="parameter_types"><type>boost::function_types::parameter_types&lt; Signature &gt;::type</type></typedef><typedef name="parameter_vector"><type>boost::fusion::result_of::as_vector&lt; parameter_types &gt;::type</type></typedef><typedef name="fused_signature_type"><type>signal_type::result_type</type></typedef><method-group name="public member functions"><method name="filter" cv=""><type/></method></method-gro
up></class-specialization><class-specialization name="filter"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Combiner"/>
+ <template-type-parameter name="Group"/>
+ <template-type-parameter name="GroupCompare"/>
+ </template><specialization><template-arg>Signature</template-arg><template-arg>fused_out_signal</template-arg><template-arg>Combiner</template-arg><template-arg>Group</template-arg><template-arg>GroupCompare</template-arg></specialization><purpose>Fused version of the filter class. </purpose><typedef name="parameter_types"><type>boost::function_types::parameter_types&lt; Signature &gt;::type</type></typedef><typedef name="parameter_vector"><type>boost::fusion::result_of::as_vector&lt; parameter_types &gt;::type</type></typedef><typedef name="signature_type"><type>Combiner::result_type</type></typedef><typedef name="fused_signature_type"><type>Combiner::result_type</type></typedef><typedef name="signal_type"><type>boost::signal&lt; signature_type, Combiner, Group, GroupCompare &gt;</type></typedef><method-group name="public member functions"><method name="filter" cv=""><type/><parameter name=""><paramtype>const filter &amp;</paramtype></parameter></method><method name="filter" cv=""><type/></method><meth
od name="default_signal" cv=""><type>signal_type &amp;</type><purpose>Returns the default out signal. </purpose></method><method name="disconnect_all_slots" cv=""><type>void</type><purpose>Disconnects all slots connected to the signet::filter. </purpose></method></method-group><copy-assignment><parameter name=""><paramtype>const filter &amp;</paramtype></parameter></copy-assignment></class-specialization></namespace></namespace></namespace></header><header name="boost/signal_network/function.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="function"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="FunctionSignature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;void&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ <template-type-parameter name="Base"><default>modifier&lt;detail::function_adapter&lt;FunctionSignature, Signature&gt;, Signature, OutSignal, Combiner, Group, GroupCompare&gt;</default></template-type-parameter>
+ </template><purpose>Converts a function into a Signal Network filter. </purpose><description><para>
+The signet::function object will receive signals of signature void(function arguments), and send signals of signature void(function return type). </para></description><typedef name="unfused"><type><classname>function</classname>&lt; Signature, FunctionSignature, OutSignal, Combiner, Group, GroupCompare, typename <classname>Base::unfused</classname> &gt;</type></typedef><method-group name="public member functions"/><constructor><parameter name="f"><paramtype>const boost::function&lt; FunctionSignature &gt; &amp;</paramtype></parameter></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/instantiator.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="instantiator"><template>
+ <template-type-parameter name="Instantiation"/>
+ <template-type-parameter name="Member"/>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><purpose>Generic component which, upon receiving a signal, instantiates an object of type Instantiation from a member object of type Member. </purpose><method-group name="public member functions"><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="seq"><paramtype>const Seq &amp;</paramtype></parameter><description><para>Instantiates an instance of Instantiation from the Member object. </para></description></method></method-group></class></namespace></namespace></namespace></header><header name="boost/signal_network/junction.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="junction"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ <template-type-parameter name="Base"><default>conditional&lt;detail::identity&lt;bool&gt;, volatile bool, Signature, OutSignal, Combiner, Group, GroupCompare&gt;</default></template-type-parameter>
+ </template><purpose>Forwards a single signal to multiple slots, and can also be disabled to stop the flow of signals. junction is a conditional with Condition identity and Member volatile bool. </purpose><typedef name="unfused"><type><classname>junction</classname>&lt; Signature, OutSignal, Combiner, Group, GroupCompare, typename <classname>Base::unfused</classname> &gt;</type></typedef><method-group name="public member functions"><method name="enable" cv=""><type>void</type><description><para>Enables the junction (signals will be forwarded). </para></description></method><method name="disable" cv=""><type>void</type><description><para>Disables the junction (signals will not be forwarded). </para></description></method></method-group><constructor><parameter name="enabled"><paramtype>bool</paramtype><default>true</default></parameter><description><para>Initializes the junction to be enabled. </para></description></constructor></class></namespace></namespace></namespace></header><header name="boost/signal
_network/modifier.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="modifier"><template>
+ <template-type-parameter name="Modification"/>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><method-group name="public member functions"><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="seq"><paramtype>const Seq &amp;</paramtype></parameter><description><para>Applies the Modification object to the received signal parameters. </para></description></method></method-group><constructor/><constructor><parameter name="m"><paramtype>const Modification &amp;</paramtype></parameter></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/mutex.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="mutex"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ <template-type-parameter name="Base"><default>instantiator&lt;boost::mutex::scoped_lock, boost::mutex, Signature, OutSignal, Combiner, Group, GroupCompare&gt;</default></template-type-parameter>
+ </template><purpose>Ensures a component is processing only one signal at a time when using multiple threads. </purpose><typedef name="unfused"><type><classname>mutex</classname>&lt; Signature, OutSignal, Combiner, Group, GroupCompare, typename <classname>Base::unfused</classname> &gt;</type></typedef></class></namespace></namespace></namespace></header><header name="boost/signal_network/selector.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"/></namespace></namespace></header><header name="boost/signal_network/socket_receiver.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="socket_receiver"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_types::result_type&lt;Signature&gt;::type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><inherit access="public">boost::signal_network::signet::storage&lt; Signature, OutSignal, Combiner, Group, GroupCompare &gt;</inherit><purpose>Receives serializable signals through a Boost.Asio socket. </purpose><description><para>
+Todo<para>socket_sender only works for Signatures of return type void.</para></para></description><typedef name="unfused"><type>boost::fusion::unfused_typed_class&lt; <classname>socket_receiver</classname>&lt; Signature, OutSignal, Combiner, Group, GroupCompare &gt;, typename base_type::base_type::parameter_types &gt;</type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><purpose>Sets the receiver to wait for a packet and send its contents via the signal. </purpose></method></method-group><constructor><parameter name="socket"><paramtype>asio::ip::tcp::socket &amp;</paramtype></parameter><purpose>Initializes the socket_sender to use the provided socket. </purpose></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/socket_sender.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="socket_sender"><template>
       <template-type-parameter name="Signature"/>
     </template><purpose>Sends serializable signals through a Boost asio socket. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read. </para>
-Todo<para>socket_sender only works for Signatures of return type void.</para>Example:<para> <programlisting>// asio test
-boost::mutex mutex_;
-boost::condition cond;
-asio::io_service io_service;
-
-// This function will set up an asio acceptor, and wait for a connection.
-// Once established, it will set up a signal network which will send
-// its final signal through the socket.
-void asio_server()
-{
- // set up the socket
- asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
- asio::ip::tcp::socket socket(io_service);
- {
- boost::mutex::scoped_lock lock(mutex_);
- acceptor.listen();
- cond.notify_all();
- }
- acceptor.accept(socket);
-
- // instantiate the components - a float generator, a filter that adds 2, and a sender
- signet::storage&lt;void (float)&gt; generator(1.0f);
- signet::function&lt;float(float)&gt; add2(boost::bind(std::plus&lt;float&gt;(), _1, 2.0f));
- signet::socket_sender&lt;void (float)&gt; sender(socket);
-
- // create the network
- generator &gt;&gt;= add2 &gt;&gt;= sender;
-
- // cause the generator to send it's stored value
- generator();
-}
-
-// main test function
-void asio_test()
-{
- // start the server in a separate thread
- boost::mutex::scoped_lock lock(mutex_);
- boost::thread t(asio_server);
- cond.wait(lock);
-
- // set up the socket
- asio::ip::tcp::endpoint endpoint_recv(asio::ip::address::from_string("127.0.0.1"), 1097);
- asio::ip::tcp::socket socket(io_service);
- socket.connect(endpoint_recv);
-
- // instatiate the components
- signet::socket_receiver&lt;void (float)&gt; receiver(socket);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- // set up the network
- receiver &gt;&gt;= collector;
-
- // this receiver is synchronous - we have to tell it to receive a signal
- receiver();
-
- BOOST_CHECK(collector.value1() == 3.0f);
-
- t.join();
-} // end void asio_test
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><parameter name=""><paramtype>...</paramtype></parameter><purpose>Serializes each of the arguments and sends them in a single packet through the socket. </purpose></method></method-group><constructor><parameter name="socket"><paramtype>asio::ip::tcp::socket &amp;</paramtype></parameter><purpose>Initializes the socket_sender to use the provided socket. </purpose></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/storage.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="storage"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Upon receiving an empty signal, outputs the stored value. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void simple_test()
-{
- // instantiate all of the components we need
- signet::storage&lt;void ()&gt; banger;
- signet::storage&lt;void (float)&gt; floater(2.5f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- // create the network
- banger &gt;&gt;= floater &gt;&gt;= collector;
-
- banger(); // signal from banger will now cause floater to output 2.5
- BOOST_CHECK(collector.value1() == 2.5f);
-
- floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
- BOOST_CHECK(collector.value1() == 1.5f);
-} // end void simple_test()
-</programlisting> </para>
-</para></description><typedef name="argN_value_type"><purpose>Stored value type. </purpose><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><purpose>Sends a signal containing the stored values. </purpose></method><method name="operator()" cv=""><type>void</type><parameter name="arg1"><paramtype>typename boost::call_traits&lt; arg1_value_type &gt;::param_type</paramtype></parameter><parameter name="arg2"><paramtype>typename boost::call_traits&lt; arg2_value_type &gt;::param_type</paramtype></parameter><parameter name=""><paramtype>...</paramtype></parameter><purpose>Sets the stored values. </purpose></method><method name="valueN" cv=""><type>boost::call_traits&lt; argN_value_type &gt;::param_type</type><purpose>Returns the stored value of parameter N using a param_type cast. </purpose></method></method-group></class></namespace></namespace></namespace><macro na
me="SIGNAL_NETWORK_ARGVAR_TYPEDEF" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_TYPEDEFS" kind="functionlike"><macro-parameter name="n"/></macro><macro name="SIGNAL_NETWORK_ARGVAR" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVARS" kind="functionlike"><macro-parameter name="n"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_TYPENAME" kind="functionlike"><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_TYPENAME_COMMA" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_TYPENAMES" kind="functionlike"><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_NAME" kind="functionlike"><macro-parameter name="n"/></macro><macro name="SIG
NAL_NETWORK_ARGVAR_NAME_COMMA" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_ARGVAR_NAMES" kind="functionlike"><macro-parameter name="n"/></macro><macro name="SIGNAL_NETWORK_SET_ARGVAR" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_SET_ARGVARS" kind="functionlike"><macro-parameter name="n"/></macro><macro name="SIGNAL_NETWORK_RETURN_STORED" kind="functionlike"><macro-parameter name="z"/><macro-parameter name="n"/><macro-parameter name="text"/></macro><macro name="SIGNAL_NETWORK_STORAGE_SIGNAL" kind="functionlike"><macro-parameter name=""/></macro><macro name="SIGNAL_NETWORK_TEMPLATE_CLASS"/><macro name="SIGNAL_NETWORK_TEMPLATE_BASE"/><macro name="SIGNAL_NETWORK_TEMPLATE_ITERATE_MAIN_CLASS"/></header><header name="boost/signal_network/storage.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="sign
et"><class name="storage"><template>
- <template-type-parameter name="Signature"/>
- </template><inherit access="public">boost::signal_network::signet::filter&lt; Signature &gt;</inherit><purpose>Upon receiving an empty signal, outputs the stored value. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void simple_test()
-{
- // instantiate all of the components we need
- signet::storage&lt;void ()&gt; banger;
- signet::storage&lt;void (float)&gt; floater(2.5f);
- signet::storage&lt;void (float)&gt; collector(0.0f);
-
- // create the network
- banger &gt;&gt;= floater &gt;&gt;= collector;
-
- banger(); // signal from banger will now cause floater to output 2.5
- BOOST_CHECK(collector.value1() == 2.5f);
-
- floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
- BOOST_CHECK(collector.value1() == 1.5f);
-} // end void simple_test()
-</programlisting> </para>
-</para></description><typedef name="argN_value_type"><purpose>Stored value type. </purpose><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>boost::function_traits&lt; Signature &gt;::result_type</type><purpose>Sends a signal containing the stored values. </purpose></method><method name="operator()" cv=""><type>void</type><parameter name="arg1"><paramtype>typename boost::call_traits&lt; arg1_value_type &gt;::param_type</paramtype></parameter><parameter name="arg2"><paramtype>typename boost::call_traits&lt; arg2_value_type &gt;::param_type</paramtype></parameter><parameter name=""><paramtype>...</paramtype></parameter><purpose>Sets the stored values. </purpose></method><method name="valueN" cv=""><type>boost::call_traits&lt; argN_value_type &gt;::param_type</type><purpose>Returns the stored value of parameter N using a param_type cast. </purpose></method></method-group></class></namespace></namespace></namespace></header>
<header name="boost/signal_network/timed_generator.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="timed_generator"><template>
+Todo<para>socket_sender only works for Signatures of return type void. </para></para></description><struct name="result"><template>
+ <template-type-parameter name="Seq"/>
+ </template><typedef name="type"><type>void</type></typedef></struct><typedef name="unfused"><type>boost::fusion::unfused_inherited&lt; <classname>socket_sender</classname>&lt; Signature &gt;, typename mpl::vector&lt; asio::ip::tcp::socket &amp; &gt;::type, typename boost::function_types::parameter_types&lt; Signature &gt; &gt;</type></typedef><typedef name="ParTypes"><type>boost::function_types::parameter_types&lt; Signature &gt;</type></typedef><method-group name="public member functions"><method name="operator()" cv=""><type>void</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="vec_par"><paramtype>const Seq &amp;</paramtype></parameter><purpose>Serializes each of the arguments and sends them in a single packet through the socket. </purpose></method></method-group><constructor><parameter name="socket"><paramtype>asio::ip::tcp::socket &amp;</paramtype></parameter><purpose>Initializes the socket_sender to use the provided socket. </purpose></constructor><constructor/><destructor/></class></namespace></namespace></namespace></header><header name="boost/signal_network/storage.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="storage"><template>
+ <template-type-parameter name="Signature"/>
+ <template-type-parameter name="OutSignal"><default>default_out_signal</default></template-type-parameter>
+ <template-type-parameter name="Combiner"><default>boost::last_value&lt;typename boost::function_traits&lt;Signature&gt;::result_type&gt;</default></template-type-parameter>
+ <template-type-parameter name="Group"><default>int</default></template-type-parameter>
+ <template-type-parameter name="GroupCompare"><default>std::less&lt;Group&gt;</default></template-type-parameter>
+ </template><purpose>Stores and transmits arguments received from a signal. </purpose><description><para>
+</para></description><method-group name="private member functions"><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><description><para>Sends a signal containing the stored parameter values.
+</para></description><returns><para>Return value of the sent signal. </para></returns></method><method name="operator()" cv=""><type>base_type::signal_type::result_type</type><parameter name=""><paramtype>const boost::fusion::vector&lt;&gt; &amp;</paramtype></parameter><description><para>Sends a signal containing the stored parameter values.
+</para></description><returns><para>Return value of the sent signal. </para></returns></method><method name="operator()" cv=""><type>void</type><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="seq"><paramtype>const Seq &amp;</paramtype><description><para>Sequence to whose value the stored parameter sequence is assigned to.</para></description></parameter><description><para>Sets the stored parameter values using the provided sequence.
+<emphasis role="bold">Note:</emphasis> Enabled only for fusion sequences of size &gt;= 1. </para></description></method><method name="stored_vector" cv=""><type>const storable_vector &amp;</type><description><para>
+</para></description><returns><para>A reference to the fusion vector of stored parameter values. </para></returns></method><method name="at" cv=""><type>boost::fusion::result_of::at_c&lt; storable_vector, N &gt;::type</type><template>
+ <template-nontype-parameter name="N"><type>int</type></template-nontype-parameter>
+ </template><description><para>
+</para></description><returns><para>The stored value of parameter N using an optimizing cast. </para></returns></method><method name="value_at" cv=""><type>boost::mpl::at_c&lt; typename base_type::parameter_types, N &gt;::type</type><template>
+ <template-nontype-parameter name="N"><type>int</type></template-nontype-parameter>
+ </template><description><para>
+</para></description><returns><para>The stored value of parameter N typed exactly as it appears in the Signature. </para></returns></method><method name="at_slot" cv=""><type>slot_selector_t</type><template>
+ <template-nontype-parameter name="N"><type>int</type></template-nontype-parameter>
+ </template><description><para>
+</para></description><returns><para>The slot selector for the related at function. </para></returns></method><method name="value_at_slot" cv=""><type>slot_selector_t</type><template>
+ <template-nontype-parameter name="N"><type>int</type></template-nontype-parameter>
+ </template><description><para>
+</para></description><returns><para>The slot selector for the value_at function. </para></returns></method></method-group><constructor><template>
+ <template-type-parameter name="Seq"/>
+ </template><parameter name="seq"><paramtype>const Seq &amp;</paramtype><description><para>Sequence from which the stored parameter sequence is initialized from. </para></description></parameter><description><para>Initializes the stored parameter values using the provided sequence.
+</para></description></constructor><constructor><description><para>Initializes the stored parameter values using its default constructor. </para></description></constructor></class></namespace></namespace></namespace></header><header name="boost/signal_network/timed_generator.hpp"><namespace name="boost"><namespace name="signal_network"><namespace name="signet"><class name="timed_generator"><template>
       <template-type-parameter name="Signature"/>
+ <template-type-parameter name="Base"><default>storage&lt;Signature&gt;</default></template-type-parameter>
     </template><inherit access="public">boost::signal_network::signet::storage&lt; Signature &gt;</inherit><purpose>Creates its own thread and periodically sends a signal with the stored value. </purpose><description><para>
-<para>Since I can't get Doxygen to unravel the preprocessed definition of this class, the documentation was generated through a non-functioning class Doxygen could read.</para>
-Example:<para> <programlisting>void mutex_test()
-{
- signet::timed_generator&lt;void ()&gt; banger1;
- signet::timed_generator&lt;void ()&gt; banger2;
- signet::mutex&lt;void ()&gt; lock;
- SignalVoidCounter counter;
- ticker tick;
-
- banger1 &gt;&gt;= lock &gt;&gt;= counter;
- banger2 &gt;&gt;= lock &gt;&gt;= tick;
- banger1.enable(0.5, 5);
- banger2.enable(0.5, 5);
-
- while (counter.GetCount() &lt; 10) {}
-
- BOOST_CHECK(counter.GetCount() == 10);
- banger1.join();
- banger2.join();
-} // end void mutex_test
-</programlisting> </para>
-</para></description><method-group name="public member functions"><method name="enable" cv=""><type>void</type><parameter name="interval"><paramtype>double</paramtype><description><para>Sets the time interval (in seconds) at which the signal is sent. </para></description></parameter><parameter name="signal_count"><paramtype>unsigned</paramtype><default>0</default><description><para>The signal will be sent signal_count times, or indefinitelly if signal_count==0. </para></description></parameter><purpose>Sets the object to send the stored value at specified time intervals. </purpose><description><para>
-</para></description></method><method name="disable" cv=""><type>void</type><purpose>Stops the sending of signals and suspends the thread. </purpose></method><method name="join" cv=""><type>void</type><purpose>Forces the thread to terminate. </purpose></method></method-group><constructor><purpose>Default constructor. Starts the thread, but signals won't be sent until the enable() function is called. </purpose></constructor><destructor><purpose>The thread should be joined by the time the destructor is called. </purpose></destructor><method-group name="private member functions"><method name="thread_function" cv=""><type>void</type></method></method-group></class></namespace></namespace></namespace></header><header name="C:/Development/boost_sandbox/SOC/2007/signals/libs/signal_network/doc/dox/signal_network.hpp"><namespace name="boost"><namespace name="signal_network"/></namespace></header></library-reference>
+</para></description><typedef name="unfused"><type><classname>timed_generator</classname>&lt; Signature, typename <classname>Base::unfused</classname> &gt;</type></typedef><method-group name="public member functions"><method name="enable" cv=""><type>void</type><parameter name="interval"><paramtype>double</paramtype><description><para>Sets the time interval (in seconds) at which the signal is sent. </para></description></parameter><parameter name="signal_count"><paramtype>unsigned</paramtype><default>0</default><description><para>The signal will be sent signal_count times, or indefinitelly if signal_count==0. </para></description></parameter><purpose>Sets the object to send the stored value at specified time intervals. </purpose><description><para>
+</para></description></method><method name="disable" cv=""><type>void</type><purpose>Stops the sending of signals and suspends the thread. </purpose></method><method name="join" cv=""><type>void</type><purpose>Forces the thread to terminate. </purpose></method></method-group><constructor><purpose>Default constructor. Starts the thread, but signals won't be sent until the enable() function is called. </purpose></constructor><destructor><purpose>The thread should be joined by the time the destructor is called. </purpose></destructor><method-group name="private member functions"><method name="thread_function" cv=""><type>void</type></method></method-group></class></namespace></namespace></namespace></header></library-reference>

Modified: sandbox/SOC/2007/signals/libs/signal_network/example/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/example/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/example/Jamfile.v2 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,18 +1,15 @@
-# Copyright 2007 Stjepan Rajko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-
-project
- : requirements
- <include>../../..
- <library>/boost/test//boost_unit_test_framework/<link>static
- <library>/boost/signals//boost_signals/<link>static
- <library>/boost/thread//boost_thread/<link>static
- <library>/boost/system//boost_system/<link>static
- <library>/boost/serialization//boost_serialization/<link>static
- <define>BOOST_ALL_NO_LIB=1
- ;
-
-exe example : example.cpp ;
\ No newline at end of file
+# Copyright 2007 Stjepan Rajko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+
+project
+ : requirements
+ <include>../../..
+ <library>/boost/signals//boost_signals/<link>static
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+exe example : example.cpp ;
+exe timing_example : timing_example.cpp ;

Modified: sandbox/SOC/2007/signals/libs/signal_network/example/example.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/example/example.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/example/example.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,622 +1,31 @@
-// SignalLinkTests.cpp
-
 // Copyright Stjepan Rajko 2007. Use, modification and
 // distribution is subject to the Boost Software License, Version
 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#define _CRT_SECURE_NO_DEPRECATE 1
-#include <boost/fusion/sequence/generation/make_vector.hpp>
-
-
-#include <boost/test/unit_test.hpp>
-using boost::unit_test::test_suite;
-
-#define BOOST_SIGNALS_STATIC_LINK
-#include <boost/optional.hpp>
-#include <boost/signal_network/filter.hpp>
-#include <boost/signal_network/storage.hpp>
-#include <boost/signal_network/junction.hpp>
-#include <boost/signal_network/selector.hpp>
-#include <boost/signal_network/mutex.hpp>
-#include <boost/signal_network/timed_generator.hpp>
 #include <boost/signal_network/function.hpp>
-#include <boost/signal_network/chain.hpp>
-
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#define _WIN32_WINDOWS
-#endif
-#include <boost/signal_network/socket_receiver.hpp>
-#include <boost/signal_network/socket_sender.hpp>
-#undef _WIN32_WINDOWS
+#include <boost/signal_network/storage.hpp>
 
 // for access to connection operators >>= and |
 using namespace boost::signal_network;
 using namespace boost;
 
-class SignalVoidCounter
-#ifdef SIGNAL_NETWORK_TRACKABLE
- // Two base signals implementations are supported currently
- // (Boost.Signals by Doug Gregor and the
- // thread_safe_signals version under implementation by Frank Mori Hess).
- // SIGNAL_NETWORK_TRACKABLE is defined if you are using Boost.Signals
- // - in this case, we want to make our component trackable so that
- // it gets disconnected automatically when this object is destroyed.
- : public boost::signals::trackable
-#endif
-{
- volatile int cnt;
-public:
- SignalVoidCounter() : cnt(0) {}
- void operator()()
- {
- cnt++; // whenever a void() signal is received, increase the counter
- }
- int GetCount()
- {
- return cnt;
- }
-}; // end class SignalVoidCounter
-
-class SignalIntFloatCollector
-{
- optional<int> last_int;
- optional<float> last_float;
-public:
- void operator()(int x)
- {
- last_int = x;
- }
- void operator()(float x)
- {
- last_float = x;
- }
- optional<int> GetLastInt()
- {
- return last_int;
- }
- optional<float> GetLastFloat()
- {
- return last_float;
- }
-}; // end class SignalIntFloatCollector
-
-class SignalFloatDoubler : public signet::filter<void (float, float)>
-{
-public:
- void operator()(float val) {out(val, val*2);}
-};
-
-class SignalFloatDuplicator : public signet::filter<void (float, float)>
-{
-public:
- void operator()(float val) {out(val, val);}
-};
-
-class SignalFloat2Collector
-{
- optional<float> last1, last2;
-public:
- void operator()(float val1, float val2)
- {
- last1 = val1;
- last2 = val2;
- }
- optional<float> GetLast1()
- {
- return last1;
- }
- optional<float> GetLast2()
- {
- return last2;
- }
-};
-
-void simple_test()
-{
- // instantiate all of the components we need
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- // create the network
- banger >>= floater >>= collector;
-
- banger(); // signal from banger will now cause floater to output 2.5
- BOOST_CHECK(collector.value_<0>() == 2.5f);
-
- floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
- BOOST_CHECK(collector.value_<0>() == 1.5f);
-} // end void simple_test()
-
-void branching_test()
-{
- signet::storage<void ()>::unfused banger;
- SignalVoidCounter counter;
- signet::storage<void (float)>::unfused floater;
- floater(2.5f);
-
- signet::storage<void (float)>::unfused collector(0.0f);
-
- banger
- | (floater >>= collector) // floater connects to collector, banger to floater
- | counter; // and banger to counter
-
- banger();
- BOOST_CHECK(counter.GetCount() == 1);
- BOOST_CHECK(collector.value_<0>() == 2.5f);
-} // end void branching_test()
-
-void disconnect_test()
-{
- signet::storage<void ()>::unfused banger;
- {
- SignalVoidCounter counter;
- signet::storage<void (float)>::unfused floater;
- floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- banger
- | counter
- | (floater >>= collector);
-
- banger();
- BOOST_CHECK(counter.GetCount() == 1);
- BOOST_CHECK(collector.value_<0>() == 2.5f);
- } // counter, floater, and collector are now destroyed and disconnected with Boost.Signals
-#ifdef SIGNAL_NETWORK_THREAD_SAFE
- // if Signal Network has detected thread safe signals, we need to
- // touch the signal to disconnect things that are destroyed:
- // unfortunatelly, this call hangs on MSVC!
- // banger();
-#endif
- BOOST_CHECK(banger.default_signal().num_slots() == 0);
-
- SignalVoidCounter counter;
-
- banger >>= counter;
- banger.disconnect_all_slots();
-
- banger();
- BOOST_CHECK(counter.GetCount() == 0);
-} // end void disconnect_test
-
-void multi_type_test()
-{
- signet::storage<void ()>::unfused banger;
- signet::storage<void (int)>::unfused inter;
- inter(2);
- signet::storage<void (float)>::unfused floater;
- floater(3.3f);
- SignalIntFloatCollector collector;
-
- banger
- | (inter >>= collector)
- | (floater >>= collector);
-
- banger();
- BOOST_CHECK(collector.GetLastInt() == optional<int>(2));
- BOOST_CHECK(collector.GetLastFloat() == optional<float>(3.3f));
-} // end void multi_type_test()
-
-class SignalMultiCollector
-{
- optional<float> last, last1, last2;
- int cnt;
-public:
- SignalMultiCollector() : cnt(0) {}
- void operator()()
- {
- cnt++;
- }
- int GetCount()
- {
- return cnt;
- }
- void operator()(float val1, float val2)
- {
- last1 = val1;
- last2 = val2;
- }
- optional<float> GetLast1()
- {
- return last1;
- }
- optional<float> GetLast2()
- {
- return last2;
- }
- void operator()(float x)
- {
- last = x;
- }
- optional<float> GetLast()
- {
- return last;
- }
-}; // end class SignalMultiCollector
-
-void multi_num_args_test()
-{
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater;
- floater(2.5f);
- SignalFloatDuplicator duplicator;
- SignalMultiCollector collector;
-
- banger
- | collector
- |
- (floater
- | collector
- | (duplicator >>= collector));
-
- banger();
- BOOST_CHECK(collector.GetCount() == 1);
- BOOST_CHECK(collector.GetLast() == optional<float>(2.5f));
- BOOST_CHECK(collector.GetLast1() == optional<float>(2.5f));
- BOOST_CHECK(collector.GetLast2() == optional<float>(2.5f));
-} // end void multi_num_args_test()
-
-
-class SignalMultiInheritedCollector : public signet::storage<void (float)>::unfused, public SignalVoidCounter, public SignalFloat2Collector
-{
-public:
- SignalMultiInheritedCollector() : signet::storage<void (float)>::unfused(0) {}
-};
-
-void multi_num_args_inherited_test()
-{
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater;
- floater(2.5f);
- SignalFloatDuplicator duplicator;
- SignalMultiInheritedCollector collector;
-
- banger
- | (SignalVoidCounter &) collector
- |
- (floater
- | (signet::storage<void (float)>::unfused &) collector
- | (duplicator >>= (SignalFloat2Collector &) collector));
-
- banger();
- BOOST_CHECK(collector.GetCount() == 1);
- BOOST_CHECK(collector.value_<0>() == 2.5f); // calls the collector<float>'s operator()
- BOOST_CHECK(collector.GetLast1() == optional<float>(2.5f));
- BOOST_CHECK(collector.GetLast2() == optional<float>(2.5f));
-} // end void multi_num_args_inherited_test()
-
-class SignalOutIntFloat : public signet::filter<void (float)>
-{
-public:
- SignalOutIntFloat(float x) : x(x) {}
- void operator()()
- {
- out(x);
- out_int((int)x);
- }
- boost::signal<void (int)> out_int;
-private:
- float x;
-}; // end class SignalOutIntFloat
-
-void multi_out_test()
-{
- SignalOutIntFloat multi_out(2.5f);
- SignalIntFloatCollector collector;
-
- multi_out >>= collector;
- multi_out.out_int >>= collector;
- multi_out();
-
- BOOST_CHECK(collector.GetLastFloat() == optional<float>(2.5f));
- BOOST_CHECK(collector.GetLastInt() == optional<int>(2));
-} // end void multi_out_test()
-
-class Signal2VoidCounter : public SignalVoidCounter
-{
-public:
- SignalVoidCounter other;
-}; // end class Signal2VoidCounter
-
-class Signal2VoidInputs : public signet::filter<void(int)>
-{
- int result;
-public:
- Signal2VoidInputs() : result(0) {};
- void operator()()
- {
- result++;
- out(result);
- }
- void AltInput()
- {
- result+=10;
- out(result);
- }
- int GetResult()
- {
- return result;
- }
-}; // end class Signal2VoidInputs
-
-void multi_in_test()
-{
- signet::storage<void ()>::unfused banger;
- Signal2VoidCounter counter;
-
- banger
- | counter
- | counter.other;
-
- banger();
- BOOST_CHECK(counter.GetCount() == 1);
- BOOST_CHECK(counter.other.GetCount() == 1);
-
- Signal2VoidInputs inputs;
-
- banger
- | inputs
- | slot_selector<void ()> (inputs, &Signal2VoidInputs::AltInput);
-
- banger();
- BOOST_CHECK(inputs.GetResult() == 11);
-}; // end void multi_in_test
-
-void junction_test()
-{
- signet::storage<void ()>::unfused banger1, banger2;
- SignalVoidCounter counter1, counter2;
- signet::junction<void ()>::unfused junction;
-
- banger1 >>= junction >>= counter1;
- banger2 >>= junction >>= counter2;
-
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 2);
- BOOST_CHECK(counter2.GetCount() == 2);
-
- junction.disable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 2);
- BOOST_CHECK(counter2.GetCount() == 2);
-
- junction.enable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.GetCount() == 4);
- BOOST_CHECK(counter2.GetCount() == 4);
-} // end void junction_test()
-
-void selector_test()
-{
-/* signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater1, floater2;
- floater1(1.0f);
- floater2(2.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
- signet::selector<2, void (float)> selector;
-
- banger >>= floater1 >>= selector.slot1();
- banger >>= floater2 >>= selector.slot2();
- selector >>= collector;
-
- selector.select(0);
- banger();
- BOOST_CHECK(collector.value_<0>() == 0.0f);
-
- selector.select(1);
- banger();
- BOOST_CHECK(collector.value_<0>() == 1.0f);
-
- selector.select(2);
- banger();
- BOOST_CHECK(collector.value_<0>() == 2.0f);*/
-} // end void selector_test()
-
-#include <iostream>
-using namespace std;
-
-struct ticker
-{
- void operator()()
- {
- cout << "tick" << endl;
- }
-};
-
-void mutex_test()
-{
- signet::timed_generator<void ()> banger1;
- signet::timed_generator<void ()> banger2;
- signet::mutex<void ()>::unfused lock;
- SignalVoidCounter counter;
- ticker tick;
-
- banger1 >>= lock >>= counter;
- banger2 >>= lock >>= tick;
- banger1.enable(0.5, 5);
- banger2.enable(0.5, 5);
-
- while (counter.GetCount() < 10) {}
-
- BOOST_CHECK(counter.GetCount() == 10);
- banger1.join();
- banger2.join();
-} // end void mutex_test
-
-class DoublerClass : public signet::filter<void (float)>
-{
-public:
- void operator()(float x) {out(2*x);}
-};
-
-void filter_test()
-{
- DoublerClass doubler1, doubler2;
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- floater >>= doubler1 >>= doubler2 >>= collector;
- floater();
-
- BOOST_CHECK(collector.value_<0>() == 4.0f);
-} // end void filter_test()
-
 float DoublerFunc(float x)
 {
         return x*2;
 }
 
-void function_test()
+int main(int, char* [])
 {
- signet::function<float(float)>::unfused double_fun1(&DoublerFunc);
- signet::function<float(float)>::unfused double_fun2(&DoublerFunc);
+ signet::function<void (float), float(float)>::unfused double_fun1(&DoublerFunc);
+ signet::function<void (float), float(float)>::unfused double_fun2(&DoublerFunc);
         signet::storage<void (float)>::unfused floater(1.0f);
         signet::storage<void (float)>::unfused collector(0.0f);
-
+
         floater >>= double_fun1 >>= double_fun2 >>= collector;
         floater();
-
- BOOST_CHECK(collector.value_<0>() == 4.0f);
-} // end void function_test()
-
-void chain_test()
-{
- signet::chain<DoublerClass, void(float)>::unfused doubling_chain(4, NULL);
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- floater >>= doubling_chain >>= collector;
- floater();
-
- BOOST_CHECK(collector.value_<0>() == 16.0f);
-} // end void chain_test
-
-class PullDoubler : public signet::filter<float ()>
-{
-public:
- float operator()()
- {
- return 2*out();
- }
-};
-
-void pull_test()
-{
- signet::storage<void(float)>::unfused generator(1.0f);
- PullDoubler doubler;
-
- doubler >>= generator.slot<0>();
-
- BOOST_CHECK(doubler() == 2.0f);
-} // end void pull_test
-
-// asio test
-boost::mutex mutex_;
-boost::condition cond;
-asio::io_service io_service;
-
-// This function will set up an asio acceptor, and wait for a connection.
-// Once established, it will set up a signal network which will send
-// its final signal through the socket.
-void asio_server()
-{
- // set up the socket
- asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
- asio::ip::tcp::socket socket(io_service);
- {
- boost::mutex::scoped_lock lock(mutex_);
- acceptor.listen();
- cond.notify_all();
- }
- acceptor.accept(socket);
-
- // instantiate the components - a float generator, a filter that adds 2, and a sender
- signet::storage<void (float)>::unfused generator(1.0f);
- signet::function<float(float)>::unfused add2(boost::bind(std::plus<float>(), _1, 2.0f));
- signet::socket_sender<void (float)>::unfused sender(socket);
-
- // create the network
- generator >>= add2 >>= sender;
-
- // cause the generator to send it's stored value
- generator();
-}
-
-// main test function
-void asio_test()
-{
- // start the server in a separate thread
- boost::mutex::scoped_lock lock(mutex_);
- boost::thread t(asio_server);
- cond.wait(lock);
-
- // set up the socket
- asio::ip::tcp::endpoint endpoint_recv(asio::ip::address::from_string("127.0.0.1"), 1097);
- asio::ip::tcp::socket socket(io_service);
- socket.connect(endpoint_recv);
-
- // instatiate the components
- signet::socket_receiver<void (float)> receiver(socket);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- // set up the network
- receiver >>= collector;
-
- // this receiver is synchronous - we have to tell it to receive a signal
- receiver();
-
- BOOST_CHECK(collector.value_<0>() == 3.0f);
-
- t.join();
-} // end void asio_test
-
-test_suite* init_unit_test_suite(int argc, char* argv[])
-{
- signet::storage<void (int, int)> s;
- boost::fusion::vector<int, int> val(4, 5);
- s(val);
- std::cout << s.value_<0>() << s.value_<1>() << std::endl;
- signet::storage<void (int, int) >::unfused s2;
-
- s >>= s2;
- s();
- std::cout << s2.value_<0>() << s2.value_<1>() << std::endl;
-
- signet::storage<void (int, int) >::unfused s3(5, 6);
- std::cout << s3.value_<0>() << s3.value_<1>() << std::endl;
- s3(7, 8);
- std::cout << s3.value_<0>() << s3.value_<1>() << std::endl;
-
-
- test_suite* test = BOOST_TEST_SUITE( "Utility test suite" );
-
- test->add(BOOST_TEST_CASE(&simple_test));
- test->add(BOOST_TEST_CASE(&branching_test));
- test->add(BOOST_TEST_CASE(&disconnect_test));
- test->add(BOOST_TEST_CASE(&multi_type_test));
- test->add(BOOST_TEST_CASE(&multi_num_args_test));
- test->add(BOOST_TEST_CASE(&multi_num_args_inherited_test));
- test->add(BOOST_TEST_CASE(&multi_out_test));
- test->add(BOOST_TEST_CASE(&multi_in_test));
- test->add(BOOST_TEST_CASE(&junction_test));
- test->add(BOOST_TEST_CASE(&selector_test));
- test->add(BOOST_TEST_CASE(&mutex_test));
- test->add(BOOST_TEST_CASE(&filter_test));
- test->add(BOOST_TEST_CASE(&function_test));
- test->add(BOOST_TEST_CASE(&chain_test));
- test->add(BOOST_TEST_CASE(&pull_test));
- test->add(BOOST_TEST_CASE(&asio_test));
-
- return test;
-}
+
+ assert(collector.at<0>() == 4.0f);
+
+ return 0;
+} // int main(int, char* [])
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/Jamfile.v2 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -1,23 +1,31 @@
-# Copyright 2007 Stjepan Rajko.
-# Distributed under the Boost Software License, Version 1.0. (See
-# accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-import testing ;
-
-project
- : requirements
- <include>../../..
- <library>/boost/signals//boost_signals/<link>static
- <library>/boost/system//boost_system/<link>static
- <define>BOOST_ALL_NO_LIB=1
- ;
-
-run test_storage.cpp ;
-run test_counter.cpp ;
-run test_junction.cpp ;
-run test_function.cpp ;
-run test_chain.cpp ;
-run test_mutex.cpp /boost/thread//boost_thread/<link>static ;
-run test_socket.cpp /boost/serialization//boost_serialization/<link>static
- /boost/thread//boost_thread/<link>static ;
\ No newline at end of file
+# Copyright 2007 Stjepan Rajko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import testing ;
+
+project
+ : requirements
+ <include>../../..
+ <library>/boost/signals//boost_signals/<link>static
+ <library>/boost/system//boost_system/<link>static
+ <define>BOOST_ALL_NO_LIB=1
+ ;
+
+run test_storage.cpp ;
+run test_counter.cpp ;
+run test_junction.cpp ;
+run test_function.cpp ;
+run test_chain.cpp ;
+run test_mutex.cpp
+ /boost/thread//boost_thread/<link>static ;
+run test_socket.cpp
+ /boost/serialization//boost_serialization/<link>static
+ /boost/thread//boost_thread/<link>static ;
+# run test_connections.cpp
+# /boost/test//boost_unit_test_framework/<link>static
+# /boost/thread//boost_thread/<link>static
+# /boost/serialization//boost_serialization/<link>static ;
+
+run test_branching.cpp ;
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_chain.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -5,29 +5,62 @@
 
 #include <boost/signal_network/chain.hpp>
 #include <boost/signal_network/storage.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/fusion/sequence/generation/make_vector.hpp>
 
 // for access to connection operators >>= and |
 using namespace boost::signal_network;
 using namespace boost;
 
-#include <boost/test/included/test_exec_monitor.hpp>
-
-class DoublerClass : public signet::filter<void (float)>
+//[ test_chain_classes
+class UnfusedDoublerClass : public signet::filter<void (float), signet::unfused_out_signal>
 {
 public:
+ typedef void result_type;
         void operator()(float x) {out(2*x);}
 };
 
-int test_main(int, char* [])
-{
- signet::chain<DoublerClass, void(float)>::unfused doubling_chain(4, NULL);
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- floater >>= doubling_chain >>= collector;
- floater();
-
- BOOST_CHECK(collector.value_<0>() == 16.0f);
+class FusedDoublerClass : public signet::filter<void (float), signet::fused_out_signal>
+{
+public:
+ typedef void result_type;
+ void operator()(const fusion::vector<float> &x)
+ {
+ // this should be more general but having problems with the general approach...
+ fusion::vector<float> y;
+ boost::fusion::at_c<0>(y) = 2 * boost::fusion::at_c<0>(x);
+ fused_out(y);
+ }
+};
+//]
 
+int test_main(int, char* [])
+{
+ {
+ //[ test_chain_unfused
+ signet::chain<UnfusedDoublerClass, void(float)>::unfused doubling_chain(4, NULL);
+ signet::storage<void (float)>::unfused floater(1.0f);
+ signet::storage<void (float)>::unfused collector(0.0f);
+
+ floater >>= doubling_chain >>= collector;
+ floater();
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 16.0f);
+ //]
+ }
+ {
+ //[ test_chain_fused
+ signet::chain<FusedDoublerClass, void(float)> doubling_chain(4, NULL);
+ signet::storage<void (float)> floater(1.0f);
+ signet::storage<void (float)> collector(0.0f);
+
+ floater >>= doubling_chain >>= collector;
+ floater();
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 16.0f);
+ //]
+ }
     return 0;
 } // int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_counter.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -13,11 +13,24 @@
 
 int test_main(int, char* [])
 {
- signet::counter<void ()>::unfused counter1;
-
- for (int i=0; i<33; i++)
- counter1();
- BOOST_CHECK_EQUAL(counter1.count(), 33);
-
+ {
+ //[ test_counter_unfused
+ signet::counter<void ()>::unfused counter;
+
+ for (int i=0; i<33; i++)
+ counter();
+ BOOST_CHECK_EQUAL(counter.count(), 33);
+ //]
+ }
+ {
+ //[ test_counter_fused
+ signet::counter<void ()> counter;
+
+ for (int i=0; i<33; i++)
+ counter(boost::fusion::vector<>());
+ BOOST_CHECK_EQUAL(counter.count(), 33);
+ //]
+ }
+
     return 0;
 } // int test_main(int, char* [])
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_function.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -10,24 +10,39 @@
 using namespace boost::signal_network;
 using namespace boost;
 
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
 
-float DoublerFunc(float x)
+int test_main(int, char* [])
 {
- return x*2;
-}
-
-int test_main(int, char* [])
-{
- signet::function<float(float)>::unfused double_fun1(&DoublerFunc);
- signet::function<float(float)>::unfused double_fun2(&DoublerFunc);
- signet::storage<void (float)>::unfused floater(1.0f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- floater >>= double_fun1 >>= double_fun2 >>= collector;
- floater();
-
- BOOST_CHECK(collector.value_<0>() == 4.0f);
-
+ {
+ //[ test_function_unfused
+ signet::function<void (float), float(float)>::unfused
+ double_fun1(boost::bind(std::multiplies<float>(), _1, 2.0f));
+ signet::function<void (float), float(float)>::unfused
+ double_fun2(boost::bind(std::multiplies<float>(), _1, 2.0f));
+ signet::storage<void (float)>::unfused floater(1.0f);
+ signet::storage<void (float)>::unfused collector(0.0f);
+
+ floater >>= double_fun1 >>= double_fun2 >>= collector;
+ floater();
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
+ //]
+ }
+ {
+ //[ test_function_fused
+ signet::function<void (float), float(float)>
+ double_fun1(boost::bind(std::multiplies<float>(), _1, 2.0f));
+ signet::function<void (float), float(float)>
+ double_fun2(boost::bind(std::multiplies<float>(), _1, 2.0f));
+ signet::storage<void (float)> floater(1.0f);
+ signet::storage<void (float)> collector(0.0f);
+
+ floater >>= double_fun1 >>= double_fun2 >>= collector;
+ floater();
+
+ BOOST_CHECK_EQUAL(collector.at<0>(), 4.0f);
+ //]
+ }
     return 0;
 } // int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_junction.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -11,36 +11,69 @@
 using namespace boost::signal_network;
 using namespace boost;
 
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
 
-int test_main(int, char* [])
-{
- signet::storage<void ()>::unfused banger1, banger2;
- signet::counter<void ()>::unfused counter1, counter2;
- signet::junction<void ()>::unfused junction;
-
- banger1 >>= junction >>= counter1;
- banger2 >>= junction >>= counter2;
-
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.count() == 2);
- BOOST_CHECK(counter2.count() == 2);
-
- junction.disable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.count() == 2);
- BOOST_CHECK(counter2.count() == 2);
-
- junction.enable();
- banger1();
- banger2();
-
- BOOST_CHECK(counter1.count() == 4);
- BOOST_CHECK(counter2.count() == 4);
-
- return 0;
+int test_main(int, char* [])
+{
+ {
+ //[ test_junction_unfused
+ signet::storage<void ()>::unfused banger1, banger2;
+ signet::counter<void ()>::unfused counter1, counter2;
+ signet::junction<void ()>::unfused junction;
+
+ banger1 >>= junction >>= counter1;
+ banger2 >>= junction >>= counter2;
+
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 2);
+ BOOST_CHECK_EQUAL(counter2.count(), 2);
+
+ junction.disable();
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 2);
+ BOOST_CHECK_EQUAL(counter2.count(), 2);
+
+ junction.enable();
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 4);
+ BOOST_CHECK_EQUAL(counter2.count(), 4);
+ //]
+ }
+ {
+ //[ test_junction_fused
+ signet::storage<void ()> banger1, banger2;
+ signet::counter<void ()> counter1, counter2;
+ signet::junction<void ()> junction;
+
+ banger1 >>= junction >>= counter1;
+ banger2 >>= junction >>= counter2;
+
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 2);
+ BOOST_CHECK_EQUAL(counter2.count(), 2);
+
+ junction.disable();
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 2);
+ BOOST_CHECK_EQUAL(counter2.count(), 2);
+
+ junction.enable();
+ banger1();
+ banger2();
+
+ BOOST_CHECK_EQUAL(counter1.count(), 4);
+ BOOST_CHECK_EQUAL(counter2.count(), 4);
+ //]
+ }
+ return 0;
 } // int test_main(int, char* [])
\ No newline at end of file

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_mutex.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -13,32 +13,45 @@
 
 #include <boost/test/included/test_exec_monitor.hpp>
 
-struct ticker
+int test_main(int, char* [])
 {
- void operator()()
- {
- std::cout << "tick" << std::endl;
- }
-};
-
-int test_main(int, char* [])
-{
- signet::timed_generator<void ()> banger1;
- signet::timed_generator<void ()> banger2;
- signet::mutex<void ()>::unfused lock;
- signet::counter<void ()>::unfused counter;
- ticker tick;
-
- banger1 >>= lock >>= counter;
- banger2 >>= lock >>= tick;
- banger1.enable(0.5, 5);
- banger2.enable(0.5, 5);
-
- while (counter.count() < 10) {}
-
- BOOST_CHECK_EQUAL(counter.count(), 10);
- banger1.join();
- banger2.join();
-
+ {
+ //[ test_mutex_unfused
+ signet::timed_generator<void ()>::unfused banger1;
+ signet::timed_generator<void ()>::unfused banger2;
+ signet::mutex<void ()>::unfused lock;
+ signet::counter<void ()>::unfused counter;
+
+ banger1 >>= lock >>= counter;
+ banger2 >>= lock;
+ banger1.enable(0.5, 5);
+ banger2.enable(0.5, 5);
+
+ while (counter.count() < 10) {}
+
+ BOOST_CHECK_EQUAL(counter.count(), 10);
+ banger1.join();
+ banger2.join();
+ //]
+ }
+ {
+ //[ test_mutex_fused
+ signet::timed_generator<void ()> banger1;
+ signet::timed_generator<void ()> banger2;
+ signet::mutex<void ()> lock;
+ signet::counter<void ()> counter;
+
+ banger1 >>= lock >>= counter;
+ banger2 >>= lock;
+ banger1.enable(0.5, 5);
+ banger2.enable(0.5, 5);
+
+ while (counter.count() < 10) {}
+
+ BOOST_CHECK_EQUAL(counter.count(), 10);
+ banger1.join();
+ banger2.join();
+ //]
+ }
     return 0;
 } // int test_main(int, char* [])

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_socket.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -5,28 +5,23 @@
 
 #include <boost/asio.hpp>
 #include <boost/test/included/test_exec_monitor.hpp>
-
-/*#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#define _WIN32_WINDOWS
-#endif*/
-#include <boost/signal_network/socket_receiver.hpp>
-#include <boost/signal_network/socket_sender.hpp>
-#include <boost/signal_network/function.hpp>
+
+#include <boost/signal_network/socket_receiver.hpp>
+#include <boost/signal_network/socket_sender.hpp>
+#include <boost/signal_network/function.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/condition.hpp>
 
+//[ test_socket
+
 // for access to connection operators >>= and |
 using namespace boost::signal_network;
 using namespace boost;
 
-
-// asio test
-boost::mutex mutex_;
-boost::condition cond;
-asio::io_service io_service;
+mutex mutex_;
+condition cond;
+asio::io_service io_service;
 
 // This function will set up an asio acceptor, and wait for a connection.
 // Once established, it will set up a signal network which will send
@@ -34,35 +29,35 @@
 void asio_server()
 {
         // set up the socket
- asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
- asio::ip::tcp::socket socket(io_service);
+ asio::ip::tcp::acceptor acceptor(io_service, asio::ip::tcp::endpoint(asio::ip::tcp::v4(), 1097));
+ asio::ip::tcp::socket socket(io_service);
         {
                 boost::mutex::scoped_lock lock(mutex_);
                 acceptor.listen();
- cond.notify_all();
- }
- acceptor.accept(socket);
-
- // instantiate the components - a float generator, a filter that adds 2, and a sender
- signet::storage<void (float)>::unfused generator(1.0f);
- signet::function<float(float)>::unfused add2(boost::bind(std::plus<float>(), _1, 2.0f));
- signet::socket_sender<void (float)>::unfused sender(socket);
-
- // create the network
- generator >>= add2 >>= sender;
-
- // cause the generator to send it's stored value
- generator();
+ cond.notify_all();
+ }
+ acceptor.accept(socket);
+
+ // instantiate the components - a float generator, a filter that adds 2, and a sender
+ signet::storage<void (float)>::unfused generator(1.0f);
+ signet::function<void (float), float(float)>::unfused add2(boost::bind(std::plus<float>(), _1, 2.0f));
+ signet::socket_sender<void (float)>::unfused sender(socket);
+
+ // create the network
+ generator >>= add2 >>= sender;
+
+ // cause the generator to send it's stored value
+ generator();
 }
 
-int test_main(int, char* [])
-{
+int test_main(int, char* [])
+{
         // start the server in a separate thread
         boost::mutex::scoped_lock lock(mutex_);
- boost::thread t(asio_server);
- cond.wait(lock);
-
- // set up the socket
+ boost::thread t(asio_server);
+ cond.wait(lock);
+
+ // set up the socket
         asio::ip::tcp::endpoint endpoint_recv(asio::ip::address::from_string("127.0.0.1"), 1097);
         asio::ip::tcp::socket socket(io_service);
         socket.connect(endpoint_recv);
@@ -77,9 +72,10 @@
         // this receiver is synchronous - we have to tell it to receive a signal
         receiver();
 
- BOOST_CHECK(collector.value_<0>() == 3.0f);
-
- t.join();
+ BOOST_CHECK_EQUAL(collector.at<0>(), 3.0f);
+
+ t.join();
 
     return 0;
 } // int test_main(int, char* [])
+//]

Modified: sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp
==============================================================================
--- sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp (original)
+++ sandbox/SOC/2007/signals/libs/signal_network/test/test_storage.cpp 2007-06-12 15:57:42 EDT (Tue, 12 Jun 2007)
@@ -9,23 +9,51 @@
 using namespace boost::signal_network;
 using namespace boost;
 
-#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/test/included/test_exec_monitor.hpp>
+#include <boost/fusion/sequence/view/single_view.hpp>
 
-int test_main(int, char* [])
-{
- // instantiate all of the components we need
- signet::storage<void ()>::unfused banger;
- signet::storage<void (float)>::unfused floater(2.5f);
- signet::storage<void (float)>::unfused collector(0.0f);
-
- // create the network
- banger >>= floater >>= collector;
-
- banger(); // signal from banger will now cause floater to output 2.5
- BOOST_CHECK_EQUAL(collector.value_<0>(), 2.5f);
-
- floater(1.5f); // change the value in floater
- floater(); // we can also signal floater directly
- BOOST_CHECK_EQUAL(collector.value_<0>(), 1.5f);
- return 0;
+int test_main(int, char* [])
+{
+ {
+ //[ test_storage_unfused
+ // instantiate all of the components we need
+ signet::storage<void ()>::unfused banger;
+ signet::storage<void (float)>::unfused floater(2.5f);
+ signet::storage<void (float)>::unfused collector(0.0f);
+
+ // create the network
+ banger >>= floater >>= collector;
+
+ // signal from banger causes floater to output 2.5
+ banger();
+ BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
+
+ floater(1.5f); // change the value in floater
+ floater(); // we can also signal floater directly
+ BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
+ //]
+ }
+
+ {
+ //[ test_storage_fused
+ // instantiate all of the components we need
+ signet::storage<void ()> banger;
+ signet::storage<void (float)> floater(2.5f);
+ signet::storage<void (float)> collector(0.0f);
+
+ // create the network
+ banger >>= floater >>= collector;
+
+ // signal from banger causes floater to output 2.5
+ banger();
+ BOOST_CHECK_EQUAL(collector.at<0>(), 2.5f);
+
+
+ // change the value in floater
+ floater(boost::fusion::single_view<float>(1.5f));
+ floater(); // we can also signal floater directly
+ BOOST_CHECK_EQUAL(collector.at<0>(), 1.5f);
+ //]
+ }
+ return 0;
 } // int test_main(int, char* [])
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk