Search:

SENF Extensible Network Framework

  • Home
  • Download
  • Wiki
  • BerliOS
  • ChangeLog
  • Browse SVN
  • Bug Tracker
  • Overview
  • Examples
  • HowTos
  • Glossary
  • PPI
  • Packets
  • Scheduler
  • Socket
  • Utils
  • Console
  • Daemon
  • Logger
  • Termlib
  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Directories
  • File List
  • File Members

MultiConnectorMixin.cti

Go to the documentation of this file.
00001 // $Id: MultiConnectorMixin.cti 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2009
00004 // Fraunhofer (FOKUS)
00005 // Competence Center NETwork research (NET), St. Augustin, GERMANY
00006 //     Stefan Bund <g0dil@berlios.de>
00007 //
00008 // This program is free software; you can redistribute it and/or modify
00009 // it under the terms of the GNU General Public License as published by
00010 // the Free Software Foundation; either version 2 of the License, or
00011 // (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the
00020 // Free Software Foundation, Inc.,
00021 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00022 
00026 #include "MultiConnectorMixin.ih"
00027 
00028 // Custom includes
00029 
00030 #define prefix_ inline
00031 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00032 
00033 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00034 // senf::ppi::module::detail::MultiConnectorWrapper<Module,Connector>
00035 
00036 template <class Module, class Connector>
00037 prefix_ void senf::ppi::module::detail::MultiConnectorWrapper<Module, Connector>::v_disconnected()
00038 {
00039     Connector::v_disconnected();
00040     static_cast<Module&>(this->module()).disconnected(*this);
00041 }
00042 
00043 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00044 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>
00045 
00046 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
00047 prefix_ ContainerType_ &
00048 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::connectors()
00049 {
00050     return connectors_;
00051 }
00052 
00053 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
00054 prefix_ ContainerType_ const &
00055 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::
00056 connectors()
00057     const
00058 {
00059     return connectors_;
00060 }
00061 
00062 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
00063 prefix_ void
00064 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::
00065 connectorDestroy(ConnectorType const &)
00066 {}
00067 
00068 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00069 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>
00070 
00071 template <class Self_, class ConnectorType_, class ContainerType_>
00072 prefix_ ContainerType_ &
00073 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
00074 {
00075     return connectors_;
00076 }
00077 
00078 template <class Self_, class ConnectorType_, class ContainerType_>
00079 prefix_ ContainerType_ const &
00080 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
00081     const
00082 {
00083     return connectors_;
00084 }
00085 
00086 template <class Self_, class ConnectorType_, class ContainerType_>
00087 prefix_ void
00088 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::
00089 connectorDestroy(ConnectorType const &)
00090 {}
00091 
00092 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00093 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,void>
00094 
00095 template <class Self_, class ConnectorType_>
00096 prefix_ void
00097 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,void>::
00098 disconnected(ConnectorType_ const & c)
00099 {
00100     static_cast<Self_*>(this)->connectorDestroy(&c);
00101 }
00102 
00103 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00104 
00105 #ifndef DOXYGEN
00106 
00107 // Include 'Implementation' from MultiConnectorMixin.mpp
00108 #define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
00109             0, \
00110             SENF_MULTI_CONNECTOR_MAX_ARGS, \
00111             SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
00112             3 ))
00113 #include BOOST_PP_ITERATE()
00114 
00115 #endif
00116 
00117 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00118 #undef prefix_
00119 
00120 
00121 // Local Variables:
00122 // mode: c++
00123 // fill-column: 100
00124 // comment-column: 40
00125 // c-file-style: "senf"
00126 // indent-tabs-mode: nil
00127 // ispell-local-dictionary: "american"
00128 // compile-command: "scons -u test"
00129 // End:

Contact: senf-dev@lists.berlios.de | © 2006-2010 Fraunhofer Institute for Open Communication Systems, Network Research