Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Socket / ProtocolServerSocketHandle.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 ssenf::ProtocolServerSocketHandle Boost.Preprocessor external iteration include
25  */
26
27 #if !BOOST_PP_IS_ITERATING
28 #ifndef MPP_SENF_Socket_ProtocolServerSocketHandle_
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 //-/////////////////////////////////////////////////////////////////////////////////////////////////
36 // Local Macros
37
38 #define mpp_PSSH_Arg(z,n,data) BOOST_PP_CAT(A,n) const & BOOST_PP_CAT(a,n)
39
40 #define mpp_PSSH_TemplateParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), class A )
41 #define mpp_PSSH_MethodParameters() BOOST_PP_ENUM(BOOST_PP_ITERATION(), mpp_PSSH_Arg, )
42 #define mpp_PSSH_CallParameters() BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), a )
43
44 //-/////////////////////////////////////////////////////////////////////////////////////////////////
45 #endif
46 #else
47 //-/////////////////////////////////////////////////////////////////////////////////////////////////
48
49 //-/////////////////////////////////////////////////////////////////////////////////////////////////
50 #if BOOST_PP_ITERATION_FLAGS()==1
51 //-/////////////////////////////////////////////////////////////////////////////////////////////////
52 // senf::ProtocolServerSocketHandle<SocketProtocol>::
53 // ProtocolServerSocketHandle (constructor) declaration
54
55 template < mpp_PSSH_TemplateParameters() >
56 explicit ProtocolServerSocketHandle( mpp_PSSH_MethodParameters() );
57
58 //-/////////////////////////////////////////////////////////////////////////////////////////////////
59 #elif BOOST_PP_ITERATION_FLAGS()==2
60 //-/////////////////////////////////////////////////////////////////////////////////////////////////
61 // senf::ProtocolServerSocketHandle<SocketProtocol>::
62 // ProtocolServerSocketHandle (constructor) implementation
63
64 template <class SocketProtocol>
65 template < mpp_PSSH_TemplateParameters() >
66 prefix_ senf::ProtocolServerSocketHandle<SocketProtocol>::
67 ProtocolServerSocketHandle( mpp_PSSH_MethodParameters() )
68     : ServerSocketHandle<typename SocketProtocol::Policy>(
69         std::auto_ptr<senf::SocketBody>(new ProtocolSocketBody<SocketProtocol>(true)))
70 {
71     this->protocol().init_server( mpp_PSSH_CallParameters() );
72 }
73
74 //-/////////////////////////////////////////////////////////////////////////////////////////////////
75 #endif
76 #endif
77 #if !BOOST_PP_IS_ITERATING
78 #ifdef MPP_SENF_Socket_ProtocolServerSocketHandle_
79 //-/////////////////////////////////////////////////////////////////////////////////////////////////
80 // Undefine local Macros
81
82 #undef mpp_PSSH_Arg
83 #undef mpp_PSSH_TemplateParameters
84 #undef mpp_PSSH_MethodParameters
85 #undef mpp_PSSH_CallParameters
86
87 //-/////////////////////////////////////////////////////////////////////////////////////////////////
88 #else
89 #define MPP_SENF_Socket_ProtocolServerSocketHandle_ 1
90 #endif
91 #endif
92
93 \f
94 // Local Variables:
95 // mode: c++
96 // fill-column: 100
97 // c-file-style: "senf"
98 // indent-tabs-mode: nil
99 // ispell-local-dictionary: "american"
100 // End: