// $Id$
//
-// Copyright (C) 2009
+// Copyright (C) 2009
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
namespace module {
namespace detail {
+ struct MultiConnectorMixinAccess
+ {
+# define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
+ 0, \
+ SENF_MULTI_CONNECTOR_MAX_ARGS, \
+ SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
+ 8 ))
+# include BOOST_PP_ITERATE()
+ };
+
template <class KeyType, class ConnectorType>
- struct MultiConnectorDefaultContainer
- {
- typedef boost::ptr_map<KeyType, ConnectorType> type;
+ struct MultiConnectorDefaultContainer
+ {
+ typedef boost::ptr_map<KeyType, ConnectorType> type;
+ };
+
+ template <class Module, class Connector>
+ class MultiConnectorWrapper
+ : public Connector
+ {
+ private:
+ virtual void v_disconnected() const;
};
#ifndef DOXYGEN
template <class ConnectorType>
- struct MultiConnectorDefaultContainer<void,ConnectorType>
- {
+ struct MultiConnectorDefaultContainer<void,ConnectorType>
+ {
typedef boost::ptr_vector<ConnectorType> type;
};
template <class ConnectorType>
struct MultiConnectorSelectBase
- : public boost::mpl::if_<
+ : public boost::mpl::if_<
boost::is_base_of<connector::InputConnector, ConnectorType>,
ppi::detail::DisableStandardInput, ppi::detail::DisableStandardOutput >
{};
+ template <class T> senf::mpl::rv<0> isMulticonnector(...);
+ template <class T> senf::mpl::rv<1> isMulticonnector(
+ typename boost::enable_if<boost::is_base_of<connector::OutputConnector,
+ typename T::ConnectorType>,
+ int>::type);
+ template <class T> senf::mpl::rv<2> isMulticonnector(
+ typename boost::enable_if<boost::is_base_of<connector::InputConnector,
+ typename T::ConnectorType>,
+ int>::type);
+
+ template <class T, unsigned N>
+ struct IsMulticonnectorSource_
+ : public boost::false_type
+ {};
+
+ template <class T>
+ struct IsMulticonnectorSource_<T, 1u>
+ : public boost::true_type
+ {};
+
+ template <class T>
+ struct IsMulticonnectorSource
+ : public IsMulticonnectorSource_<T, SENF_MPL_RV(isMulticonnector<T>(0))>
+ {};
+
+ template <class T, unsigned N>
+ struct IsMulticonnectorTarget_
+ : public boost::false_type
+ {};
+
+ template <class T>
+ struct IsMulticonnectorTarget_<T, 2u>
+ : public boost::true_type
+ {};
+
+ template <class T>
+ struct IsMulticonnectorTarget
+ : public IsMulticonnectorTarget_<T, SENF_MPL_RV(isMulticonnector<T>(0))>
+ {};
+
+
+
}}}}
///////////////////////////////ih.e////////////////////////////////////////