From: g0dil Date: Mon, 29 Jun 2009 15:26:19 +0000 (+0000) Subject: PPI: MultiConnectorMixin documentation fixes X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=2ed80e5a92c3053e0ea36cd4abb19e29de74c06e;p=senf.git PPI: MultiConnectorMixin documentation fixes git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1246 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/PPI/MultiConnectorMixin.cti b/PPI/MultiConnectorMixin.cti index 5f94de7..3df16d8 100644 --- a/PPI/MultiConnectorMixin.cti +++ b/PPI/MultiConnectorMixin.cti @@ -37,6 +37,15 @@ senf::ppi::module::MultiConnectorMixin +prefix_ ContainerType_ const & +senf::ppi::module::MultiConnectorMixin:: +connectors() + const +{ + return connectors_; +} + template prefix_ ContainerType_ & senf::ppi::module::MultiConnectorMixin::connectors() @@ -91,7 +100,7 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1) connect(source, target.newConnector(a1)); } -#endif +#else // Include 'Implementation' from MultiConnectorMixin.mpp #define BOOST_PP_ITERATION_PARAMS_1 (4, ( \ @@ -101,6 +110,8 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1) 3 )) #include BOOST_PP_ITERATE() +#endif + ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ diff --git a/PPI/MultiConnectorMixin.hh b/PPI/MultiConnectorMixin.hh index e607c48..7052d65 100644 --- a/PPI/MultiConnectorMixin.hh +++ b/PPI/MultiConnectorMixin.hh @@ -54,20 +54,26 @@ namespace ppi { // output, otherwise the second overload. /** \brief Connect MultiConnector source to arbitrary target + Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments. + \related module::MultiConnectorMixin */ - template - Source::ConnectorType & connect(Source & source, Target & target, A1 const & a1); + template + MultiConnectorSource::ConnectorType & connect( + MultiConnectorSource & source, Target & target, A1 const & a1); /** \brief Connect arbitrary source to MultiConnector target + Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments. + \related module::MultiConnectorMixin */ - template - Target::ConnectorType & connect(Source & source, Target & target, A1 const & a1); + template + MultiConnectorTarget::ConnectorType & connect( + Source & source, MultiConnectorTarget & target, A1 const & a1); -#endif +#else // Include 'senf::ppi::namespace member declarations' from MultiConnectorMixin.mpp # define BOOST_PP_ITERATION_PARAMS_1 (4, ( \ @@ -77,6 +83,8 @@ namespace ppi { 2 )) # include BOOST_PP_ITERATE() +#endif + namespace module { /** \brief Multi connector management @@ -153,12 +161,12 @@ namespace module { \par "Example:" senf::ppi::module::AnnotationRouter - \section senf_ppi_multiconnector_connect Connect and additional \c connectorSetup() arguments + \section senf_ppi_multiconnector_connect Connect and additional connectorSetup() arguments When connecting to a module using the MultiConnectorMixin, every new connect call will allocate a new connector \code - MuModule muModule; + MyModule muModule; senf::ppi::connect(someModule, myModule); \endcode @@ -176,6 +184,7 @@ namespace module { { container().insert(container().begin()+index, container().pop_back().release()); } + \endcode \par "Advanced note:" These additional arguments are always passed by const-reference. If you need to pass a non-const reference, declare the \c connectorSetup() argument as @@ -191,14 +200,15 @@ namespace module { : private detail::MultiConnectorSelectBase::type { public: - typedef ConnectorType_ ConnectorType; + typedef ConnectorType_ ConnectorType; ///< Type of MultiConnector connector protected: - typedef ContainerType_ ContainerType; - ContainerType_ & connectors(); + typedef ContainerType_ ContainerType; ///< Type of connector container + ContainerType_ & connectors(); ///< Get connector container + ContainerType_ const & connectors() const; ///< Get connectors container (const) private: -#ifdef DOXYGEN +#ifdef 0 // For exposition only // Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly @@ -218,6 +228,7 @@ namespace module { Target & target, A1 const & a1); #endif +#ifndef DOXYGEN // Include 'MultiConnectorMixin member declaration' from MultiConnectorMixin.mpp # define BOOST_PP_ITERATION_PARAMS_1 (4, ( \ @@ -226,10 +237,14 @@ namespace module { SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \ 1 )) # include BOOST_PP_ITERATE() + +#endif ContainerType_ connectors_; }; +#ifndef DOXYGEN + template @@ -245,7 +260,7 @@ namespace module { private: -#ifdef DOXYGEN +#if 0 // For exposition only // Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly @@ -276,6 +291,8 @@ namespace module { ContainerType_ connectors_; }; + +#endif }}} diff --git a/PPI/MultiConnectorMixin.ih b/PPI/MultiConnectorMixin.ih index 6f1f2a0..0d96226 100644 --- a/PPI/MultiConnectorMixin.ih +++ b/PPI/MultiConnectorMixin.ih @@ -41,12 +41,16 @@ namespace detail { typedef boost::ptr_map type; }; +#ifndef DOXYGEN + template struct MultiConnectorDefaultContainer { typedef boost::ptr_vector type; }; +#endif + template struct MultiConnectorSelectBase : public boost::mpl::if_<