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

ProtocolClientSocketHandle.mpp

Go to the documentation of this file.
00001 // $Id: ProtocolClientSocketHandle.mpp 1742 2010-11-04 14:51:56Z g0dil $
00002 //
00003 // Copyright (C) 2006
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 
00027 #if !BOOST_PP_IS_ITERATING && !defined(MPP_ProtocolClientSocketHandle_)
00028 #define MPP_ProtocolClientSocketHandle_ 1
00029 
00030 // Custom includes
00031 #include <boost/preprocessor/iteration/iterate.hpp>
00032 #include <boost/preprocessor/enum.hpp>
00033 #include <boost/preprocessor/cat.hpp>
00034 
00035 //-///////////////////////////mpp.p////////////////////////////////////////
00036 #elif BOOST_PP_IS_ITERATING //-
00037 //-
00038 // Local Macros
00039 
00040 #define mpp_Arg(z,n,data) BOOST_PP_CAT(A,n) const & BOOST_PP_CAT(a,n)
00041 #define mpp_TemplateParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A )
00042 #define mpp_MethodParameters() BOOST_PP_ENUM(BOOST_PP_ITERATION(), mpp_Arg, )
00043 #define mpp_CallParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), a )
00044 
00045 //-////////////////////////////////////////////////////////////////////////
00046 #if BOOST_PP_ITERATION_FLAGS()==1 //-
00047 //-
00048 // senf::ProtocolClientSocketHandle<SocketProtocol>::
00049 // ProtocolClientSocketHandle (constructor) declaration
00050 
00051 template < mpp_TemplateParameters() >
00052 explicit ProtocolClientSocketHandle( mpp_MethodParameters() );
00053 
00054 //-////////////////////////////////////////////////////////////////////////
00055 #elif BOOST_PP_ITERATION_FLAGS()==2 //-
00056 //-
00057 // senf::ProtocolClientSocketHandle<SocketProtocol>::
00058 // ProtocolClientSocketHandle (constructor) implementation
00059 
00060 template <class SocketProtocol>
00061 template < mpp_TemplateParameters() >
00062 prefix_ senf::ProtocolClientSocketHandle<SocketProtocol>::
00063 ProtocolClientSocketHandle( mpp_MethodParameters() )
00064     : ClientSocketHandle<typename SocketProtocol::Policy>(
00065         std::auto_ptr<senf::SocketBody>(new ProtocolSocketBody<SocketProtocol>(false)))
00066 {
00067     this->protocol().init_client( mpp_CallParameters() );
00068 }
00069 
00070 //-////////////////////////////////////////////////////////////////////////
00071 #endif //-
00072 //-
00073 // Undefine local Macros
00074 
00075 #undef mpp_Arg
00076 #undef mpp_TemplateParameters
00077 #undef mpp_MethodParameters
00078 #undef mpp_CallParameters
00079 
00080 //-////////////////////////////////////////////////////////////////////////
00081 #endif //-
00082 //-
00083 
00084 
00085 // Local Variables:
00086 // mode: c++
00087 // fill-column: 100
00088 // c-file-style: "senf"
00089 // indent-tabs-mode: nil
00090 // ispell-local-dictionary: "american"
00091 // compile-command: "scons -u test"
00092 // comment-column: 40
00093 // End:

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