Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Socket / ProtocolClientSocketHandle.mpp
1 // $Id$
2 //
3 // Copyright (C) 2006
4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 //     Stefan Bund <g0dil@berlios.de>
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22
23 /** \file
24     \brief ProtocolClientSocketHandle Boost.Preprocessor external iteration include
25  */
26
27 #if !BOOST_PP_IS_ITERATING && !defined(MPP_ProtocolClientSocketHandle_)
28 #define MPP_ProtocolClientSocketHandle_ 1
29
30 // Custom includes
31 #include <boost/preprocessor/iteration/iterate.hpp>
32 #include <boost/preprocessor/enum.hpp>
33 #include <boost/preprocessor/cat.hpp>
34
35 //-///////////////////////////mpp.p////////////////////////////////////////
36 #elif BOOST_PP_IS_ITERATING //-////////////////////////////////////////////
37 //-////////////////////////////////////////////////////////////////////////
38 // Local Macros
39
40 #define mpp_Arg(z,n,data) BOOST_PP_CAT(A,n) const & BOOST_PP_CAT(a,n)
41 #define mpp_TemplateParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A )
42 #define mpp_MethodParameters() BOOST_PP_ENUM(BOOST_PP_ITERATION(), mpp_Arg, )
43 #define mpp_CallParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), a )
44
45 //-////////////////////////////////////////////////////////////////////////
46 #if BOOST_PP_ITERATION_FLAGS()==1 //-//////////////////////////////////////
47 //-////////////////////////////////////////////////////////////////////////
48 // senf::ProtocolClientSocketHandle<SocketProtocol>::
49 // ProtocolClientSocketHandle (constructor) declaration
50
51 template < mpp_TemplateParameters() >
52 explicit ProtocolClientSocketHandle( mpp_MethodParameters() );
53
54 //-////////////////////////////////////////////////////////////////////////
55 #elif BOOST_PP_ITERATION_FLAGS()==2 //-////////////////////////////////////
56 //-////////////////////////////////////////////////////////////////////////
57 // senf::ProtocolClientSocketHandle<SocketProtocol>::
58 // ProtocolClientSocketHandle (constructor) implementation
59
60 template <class SocketProtocol>
61 template < mpp_TemplateParameters() >
62 prefix_ senf::ProtocolClientSocketHandle<SocketProtocol>::
63 ProtocolClientSocketHandle( mpp_MethodParameters() )
64     : ClientSocketHandle<typename SocketProtocol::Policy>(
65         std::auto_ptr<senf::SocketBody>(new ProtocolSocketBody<SocketProtocol>(false)))
66 {
67     this->protocol().init_client( mpp_CallParameters() );
68 }
69
70 //-////////////////////////////////////////////////////////////////////////
71 #endif //-/////////////////////////////////////////////////////////////////
72 //-////////////////////////////////////////////////////////////////////////
73 // Undefine local Macros
74
75 #undef mpp_Arg
76 #undef mpp_TemplateParameters
77 #undef mpp_MethodParameters
78 #undef mpp_CallParameters
79
80 //-////////////////////////////////////////////////////////////////////////
81 #endif //-/////////////////////////////////////////////////////////////////
82 //-///////////////////////////mpp.e////////////////////////////////////////
83
84 \f
85 // Local Variables:
86 // mode: c++
87 // fill-column: 100
88 // c-file-style: "senf"
89 // indent-tabs-mode: nil
90 // ispell-local-dictionary: "american"
91 // compile-command: "scons -u test"
92 // comment-column: 40
93 // End: