|
Boost-Commit : |
From: stipe_at_[hidden]
Date: 2007-12-24 20:07:58
Author: srajko
Date: 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
New Revision: 42285
URL: http://svn.boost.org/trac/boost/changeset/42285
Log:
first version of GUI done
Text files modified:
sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp | 22 ++++++------
sandbox/SOC/2007/signals/boost/dataflow/blueprint/component_bank.hpp | 2 +
sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp | 8 ++--
sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp | 2
sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp | 4 +-
sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp | 4 +-
sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp | 22 ++++++------
sandbox/SOC/2007/signals/boost/dataflow/support/detail/make_specializable_operation.hpp | 64 ++++++++++++++++++++++++++++++++++++++++
sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp | 10 +++---
sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp | 16 +++++-----
10 files changed, 110 insertions(+), 44 deletions(-)
Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/binary_operation.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -20,24 +20,24 @@
};
template<typename Operation>
-bool are_binary_operable(port &outgoing, port &incoming)
+bool are_binary_operable(port &left, port &right)
{
- if (outgoing.is_complemented_port())
+ if (left.is_complemented_port())
{
- port &resolved_incoming = incoming.resolve_key(outgoing);
+ port &resolved_right = right.resolve_key(left);
- return outgoing.as<complemented_port>().template is_operable_port_to_complement<Operation>()
- && (outgoing.as<complemented_port>().complement_type_info()
- == resolved_incoming.port_type_info());
+ return left.as<complemented_port>().template is_operable_port_to_complement<Operation>()
+ && (left.as<complemented_port>().complement_type_info()
+ == resolved_right.port_type_info());
}
- if (incoming.is_complemented_port())
+ if (right.is_complemented_port())
{
- port &resolved_outgoing = outgoing.resolve_key(outgoing);
+ port &resolved_left = left.resolve_key(left);
- return incoming.as<complemented_port>().template is_operable_complement_to_port<Operation>()
- && (incoming.as<complemented_port>().complement_type_info()
- == resolved_outgoing.port_type_info());
+ return right.as<complemented_port>().template is_operable_complement_to_port<Operation>()
+ && (right.as<complemented_port>().complement_type_info()
+ == resolved_left.port_type_info());
}
return false;
Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/component_bank.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/component_bank.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/component_bank.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -57,6 +57,8 @@
{ return key_iterator<map_type>(m_components.begin()); }
key_iterator<map_type> end()
{ return key_iterator<map_type>(m_components.end()); }
+ boost::function<component * ()> operator[](const std::string& k)
+ { return m_components[k]; }
protected:
map_type m_components;
};
Modified: sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/blueprint/port_t.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -124,16 +124,16 @@
private:
virtual bool is_operable_port_to_complement(int operation_uuid)
{
- typedef port_type outgoing_type;
- typedef typename port_traits_type::complement_port_type incoming_type;
+ typedef port_type left_type;
+ typedef typename port_traits_type::complement_port_type right_type;
if(operation_uuid == runtime::property<operations::connect, int>()())
return dataflow::are_binary_operable<
- outgoing_type, incoming_type, operations::connect, Tag>::type::value;
+ left_type, right_type, operations::connect, Tag>::type::value;
if(operation_uuid == runtime::property<operations::extract, int>()())
return dataflow::are_binary_operable<
- outgoing_type, incoming_type, operations::extract, Tag>::type::value;
+ left_type, right_type, operations::extract, Tag>::type::value;
return false;
};
Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/chain.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -58,7 +58,7 @@
}*/
typename T::signal_type &default_signal() const
{
- return boost::dataflow::get_default_port<dataflow::directions::outgoing, dataflow::signals::connect_mechanism, dataflow::signals::tag >(components[size-1]);
+ return boost::dataflow::get_default_port<dataflow::args::left, dataflow::signals::connect_mechanism, dataflow::signals::tag >(components[size-1]);
}
private:
void initialize(size_t copies, T *component=NULL)
Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/filter_base.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -26,10 +26,10 @@
dataflow::signals::tag> >,
mpl::map<
mpl::pair<dataflow::default_port_selector
- <dataflow::directions::outgoing, dataflow::signals::connect_mechanism>,
+ <dataflow::args::left, dataflow::signals::connect_mechanism>,
mpl::int_<0> >,
mpl::pair<dataflow::default_port_selector
- <dataflow::directions::incoming, dataflow::signals::connect_mechanism>,
+ <dataflow::args::right, dataflow::signals::connect_mechanism>,
mpl::int_<1> >
>,
dataflow::signals::tag>
Modified: sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/signals/component/storage.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -91,10 +91,10 @@
>,
mpl::map<
mpl::pair<dataflow::default_port_selector
- <dataflow::directions::outgoing, dataflow::signals::connect_mechanism>,
+ <dataflow::args::left, dataflow::signals::connect_mechanism>,
mpl::int_<0> >,
mpl::pair<dataflow::default_port_selector
- <dataflow::directions::incoming, dataflow::signals::connect_mechanism>,
+ <dataflow::args::right, dataflow::signals::connect_mechanism>,
mpl::int_<1> >
>,
dataflow::signals::tag>
Modified: sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/binary_operation.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -27,29 +27,29 @@
template<typename Operation, typename Mechanism, typename Tag, typename OutgoingPort, typename IncomingPort>
inline void
-binary_operation(OutgoingPort &outgoing, IncomingPort &incoming)
+binary_operation(OutgoingPort &left, IncomingPort &right)
{
extension::binary_operation_impl<
- typename default_traits_of<OutgoingPort, directions::outgoing, Mechanism, Tag>::type,
- typename default_traits_of<IncomingPort, directions::incoming, Mechanism, Tag>::type,
+ typename default_traits_of<OutgoingPort, args::left, Mechanism, Tag>::type,
+ typename default_traits_of<IncomingPort, args::right, Mechanism, Tag>::type,
Operation>
()(static_cast<typename utility::forwardable<
- typename result_of::get_default_port<OutgoingPort, directions::outgoing, Mechanism, Tag>::type>::type >
- (get_default_port<directions::outgoing, Mechanism, Tag>(outgoing)),
+ typename result_of::get_default_port<OutgoingPort, args::left, Mechanism, Tag>::type>::type >
+ (get_default_port<args::left, Mechanism, Tag>(left)),
static_cast<typename utility::forwardable<
- typename result_of::get_default_port<IncomingPort, directions::incoming, Mechanism, Tag>::type>::type >
- (get_default_port<directions::incoming, Mechanism, Tag>(incoming)));
+ typename result_of::get_default_port<IncomingPort, args::right, Mechanism, Tag>::type>::type >
+ (get_default_port<args::right, Mechanism, Tag>(right)));
}
template<typename OutgoingPort, typename IncomingPort>
inline typename enable_if<
mpl::and_<
- has_default_port<OutgoingPort, directions::outgoing, default_mechanism, default_tag>,
- has_default_port<IncomingPort, directions::incoming, default_mechanism, default_tag>
+ has_default_port<OutgoingPort, args::left, default_mechanism, default_tag>,
+ has_default_port<IncomingPort, args::right, default_mechanism, default_tag>
> >::type
-connect(OutgoingPort &outgoing, IncomingPort &incoming)
+connect(OutgoingPort &left, IncomingPort &right)
{
- binary_operation<operations::connect, default_mechanism, default_tag>(outgoing, incoming);
+ binary_operation<operations::connect, default_mechanism, default_tag>(left, right);
}
} } // namespace boost::dataflow
Modified: sandbox/SOC/2007/signals/boost/dataflow/support/detail/make_specializable_operation.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/detail/make_specializable_operation.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/detail/make_specializable_operation.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -62,8 +62,10 @@
# define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TRAITS typename Traits
# define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS typename T1
# define DATAFLOW_SPECIALIZABLE_OPERATION_TS T1
+# define DATAFLOW_SPECIALIZABLE_OPERATION_TS1 const T1
# define DATAFLOW_SPECIALIZABLE_OPERATION_TARGS T1 &
# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS T1 &t1
+# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS1 const T1 &t1
# define DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES t1
# define DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS \
typename DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF<T1, Tag>::type
@@ -73,8 +75,14 @@
# define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TRAITS typename Traits1, typename Traits2
# define DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS typename T1, typename T2
# define DATAFLOW_SPECIALIZABLE_OPERATION_TS T1, T2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_TS1 T1, const T2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_TS2 const T1, T2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_TS3 const T1, const T2
# define DATAFLOW_SPECIALIZABLE_OPERATION_TARGS T1 &, T2 &
# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS T1 &t1, T2 &t2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS1 T1 &t1, const T2 &t2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS2 const T1 &t1, T2 &t2
+# define DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS3 const T1 &t1, const T2 &t2
# define DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES t1, t2
# define DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS \
typename DATAFLOW_SPECIALIZABLE_OPERATION_TRAITS_OF<T1, Tag>::type, \
@@ -207,6 +215,56 @@
>()(DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES);
}
+template<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES,
+ typename Tag,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS>
+inline typename result_of::DATAFLOW_SPECIALIZABLE_OPERATION_NAME<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TS1,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES,
+ Tag>::type
+DATAFLOW_SPECIALIZABLE_OPERATION_NAME(DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS1)
+{
+ return extension::DATAFLOW_SPECIALIZABLE_OPERATION_IMPL<
+ DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES
+ >()(DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES);
+}
+
+#if DATAFLOW_SPECIALIZABLE_OPERATION_ARITY==2
+template<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES,
+ typename Tag,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS>
+inline typename result_of::DATAFLOW_SPECIALIZABLE_OPERATION_NAME<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TS2,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES,
+ Tag>::type
+DATAFLOW_SPECIALIZABLE_OPERATION_NAME(DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS2)
+{
+ return extension::DATAFLOW_SPECIALIZABLE_OPERATION_IMPL<
+ DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES
+ >()(DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES);
+}
+
+template<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TEMPLATES,
+ typename Tag,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS>
+inline typename result_of::DATAFLOW_SPECIALIZABLE_OPERATION_NAME<
+ DATAFLOW_SPECIALIZABLE_OPERATION_TS3,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES,
+ Tag>::type
+DATAFLOW_SPECIALIZABLE_OPERATION_NAME(DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS3)
+{
+ return extension::DATAFLOW_SPECIALIZABLE_OPERATION_IMPL<
+ DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS,
+ DATAFLOW_SPECIALIZABLE_OPERATION_TEMPLATES
+ >()(DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES);
+}
+#endif
+
}}
#undef DATAFLOW_SPECIALIZABLE_OPERATION_NAME
@@ -221,8 +279,14 @@
#undef DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TRAITS
#undef DATAFLOW_SPECIALIZABLE_OPERATION_TYPENAME_TS
#undef DATAFLOW_SPECIALIZABLE_OPERATION_TS
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_TS1
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_TS2
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_TS3
#undef DATAFLOW_SPECIALIZABLE_OPERATION_TARGS
#undef DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS1
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS2
+#undef DATAFLOW_SPECIALIZABLE_OPERATION_NAMED_TARGS3
#undef DATAFLOW_SPECIALIZABLE_OPERATION_TARGS_NAMES
#undef DATAFLOW_SPECIALIZABLE_OPERATION_GET_TRAITS
#undef DATAFLOW_SPECIALIZABLE_OPERATION_CHECK_TRAITS
Modified: sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/support/tags.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -84,11 +84,11 @@
struct disconnect_all {};
}
-namespace directions {
- /// Tag specifying the outgoing direction in binary operations.
- struct outgoing {};
- /// Tag specifying the incoming direction in binary operations.
- struct incoming {};
+namespace args {
+ /// Tag specifying the left direction in binary operations.
+ struct left {};
+ /// Tag specifying the right direction in binary operations.
+ struct right {};
}
} } // namespace boost::dataflow
Modified: sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp
==============================================================================
--- sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp (original)
+++ sandbox/SOC/2007/signals/boost/dataflow/templates/operator.hpp 2007-12-24 20:07:57 EST (Mon, 24 Dec 2007)
@@ -20,19 +20,19 @@
template<typename OutgoingPort, typename IncomingPort>
inline typename boost::enable_if<
boost::mpl::and_<
- boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::directions::outgoing, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
- boost::dataflow::has_default_port<IncomingPort, boost::dataflow::directions::incoming, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
+ boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::args::left, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
+ boost::dataflow::has_default_port<IncomingPort, boost::dataflow::args::right, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
>, OutgoingPort &
>::type
-operator DATAFLOW_TEMPLATE_OPERATOR (OutgoingPort &outgoing, IncomingPort &incoming)
-{ DATAFLOW_TEMPLATE_BINARY_OPERATION(outgoing, incoming); return outgoing;}
+operator DATAFLOW_TEMPLATE_OPERATOR (OutgoingPort &left, IncomingPort &right)
+{ DATAFLOW_TEMPLATE_BINARY_OPERATION(left, right); return left;}
template<typename OutgoingPort, typename IncomingPort>
inline typename boost::enable_if<
boost::mpl::and_<
- boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::directions::outgoing, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
- boost::dataflow::has_default_port<IncomingPort, boost::dataflow::directions::incoming, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
+ boost::dataflow::has_default_port<OutgoingPort, boost::dataflow::args::left, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>,
+ boost::dataflow::has_default_port<IncomingPort, boost::dataflow::args::right, DATAFLOW_TEMPLATE_MECHANISM, DATAFLOW_TEMPLATE_TAG>
>, OutgoingPort &
>::type
-operator DATAFLOW_TEMPLATE_OPERATOR (OutgoingPort &outgoing, const IncomingPort &incoming)
-{ DATAFLOW_TEMPLATE_BINARY_OPERATION(outgoing, incoming); return outgoing;}
+operator DATAFLOW_TEMPLATE_OPERATOR (OutgoingPort &left, const IncomingPort &right)
+{ DATAFLOW_TEMPLATE_BINARY_OPERATION(left, right); return left;}
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