4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Stefan Bund <g0dil@berlios.de>
29 \brief MultiConnectorMixin internal header */
31 #ifndef IH_SENF_PPI_MultiConnectorMixin_
32 #define IH_SENF_PPI_MultiConnectorMixin_ 1
37 //-/////////////////////////////////////////////////////////////////////////////////////////////////
44 struct MultiConnectorMixinAccess
46 # define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
48 SENF_MULTI_CONNECTOR_MAX_ARGS, \
49 SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
51 # include BOOST_PP_ITERATE()
54 template <class KeyType, class ConnectorType>
55 struct MultiConnectorDefaultContainer
57 typedef boost::ptr_map<KeyType, ConnectorType> type;
60 template <class Module, class Connector>
61 class MultiConnectorWrapper
65 virtual void v_disconnected();
70 template <class ConnectorType>
71 struct MultiConnectorDefaultContainer<void,ConnectorType>
73 typedef boost::ptr_vector<ConnectorType> type;
78 template <class ConnectorType>
79 struct MultiConnectorSelectBase
80 : public boost::mpl::if_<
81 boost::is_base_of<connector::InputConnector, ConnectorType>,
82 ppi::detail::DisableStandardInput, ppi::detail::DisableStandardOutput >
85 template <class T> senf::mpl::rv<0> isMulticonnector(...);
86 template <class T> senf::mpl::rv<1> isMulticonnector(
87 typename boost::enable_if<boost::is_base_of<connector::OutputConnector,
88 typename T::ConnectorType>,
90 template <class T> senf::mpl::rv<2> isMulticonnector(
91 typename boost::enable_if<boost::is_base_of<connector::InputConnector,
92 typename T::ConnectorType>,
95 template <class T, unsigned N>
96 struct IsMulticonnectorSource_
97 : public boost::false_type
101 struct IsMulticonnectorSource_<T, 1u>
102 : public boost::true_type
106 struct IsMulticonnectorSource
107 : public IsMulticonnectorSource_<T, SENF_MPL_RV(isMulticonnector<T>(0))>
110 template <class T, unsigned N>
111 struct IsMulticonnectorTarget_
112 : public boost::false_type
116 struct IsMulticonnectorTarget_<T, 2u>
117 : public boost::true_type
121 struct IsMulticonnectorTarget
122 : public IsMulticonnectorTarget_<T, SENF_MPL_RV(isMulticonnector<T>(0))>
129 //-/////////////////////////////////////////////////////////////////////////////////////////////////
136 // comment-column: 40
137 // c-file-style: "senf"
138 // indent-tabs-mode: nil
139 // ispell-local-dictionary: "american"
140 // compile-command: "scons -u test"