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

Setup.hh

Go to the documentation of this file.
00001 // $Id: Setup.hh 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2007
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 #ifndef HH_SENF_PPI_Setup_
00027 #define HH_SENF_PPI_Setup_ 1
00028 
00029 // Custom includes
00030 #include <boost/type_traits.hpp>
00031 #include <boost/utility/enable_if.hpp>
00032 #include "predecl.hh"
00033 
00034 //#include "Setup.mpp"
00035 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00036 
00037 namespace senf {
00038 namespace ppi {
00039 
00040 namespace detail {
00041     struct DisableStandardInput {};
00042     struct DisableStandardOutput {};
00043     struct DisableStandardConnect : public DisableStandardInput, public DisableStandardOutput {};
00044 }
00045 
00046 #ifdef DOXYGEN
00047 
00071     void connect(connector::OutputConnector & source, connector::InputConnector & target, ...);
00072 
00073 #else
00074 
00075     void connect(connector::GenericActiveOutput & source, connector::GenericPassiveInput & target);
00076     void connect(connector::GenericPassiveOutput & source, connector::GenericActiveInput & target);
00077 
00078 #endif
00079 
00080 #ifndef DOXYGEN
00081 
00082     template <class T, class C>
00083     void connect(T & source, C & target,
00084                  typename boost::disable_if< boost::is_base_of<connector::Connector, T> >::type * = 0,
00085                  typename boost::enable_if< boost::is_base_of<connector::Connector, C> >::type * = 0,
00086                  typename boost::disable_if< boost::is_base_of<detail::DisableStandardOutput, T> >::type * = 0);
00087 
00088     template <class C, class T>
00089     void connect(C & source, T & target,
00090                  typename boost::enable_if< boost::is_base_of<connector::Connector, C> >::type * = 0,
00091                  typename boost::disable_if< boost::is_base_of<connector::Connector,T> >::type * = 0,
00092                  typename boost::disable_if< boost::is_base_of<detail::DisableStandardInput, T> >::type * = 0);
00093 
00094     template <class T1, class T2>
00095     void connect(T1 & source, T2 & target,
00096                  typename boost::disable_if< boost::is_base_of<connector::Connector, T1> >::type * = 0,
00097                  typename boost::disable_if< boost::is_base_of<connector::Connector, T2> >::type * = 0,
00098                  typename boost::disable_if< boost::is_base_of<detail::DisableStandardOutput, T1> >:: type * = 0,
00099                  typename boost::disable_if< boost::is_base_of<detail::DisableStandardInput, T2> >:: type * = 0);
00100 
00101 #endif
00102 
00116     void run();
00117 
00124     void init();
00125 
00126 }}
00127 
00128 //-/////////////////////////////////////////////////////////////////////////////////////////////////
00129 #include "Setup.cci"
00130 //#include "Setup.ct"
00131 #include "Setup.cti"
00132 #endif
00133 
00134 
00135 // Local Variables:
00136 // mode: c++
00137 // fill-column: 100
00138 // comment-column: 40
00139 // c-file-style: "senf"
00140 // indent-tabs-mode: nil
00141 // ispell-local-dictionary: "american"
00142 // compile-command: "scons -u test"
00143 // End:

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