2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 // Stefan Bund <g0dil@berlios.de>
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 \brief ClientSocketHandle internal header */
24 #ifndef IH_ClientSocketHandle_
25 #define IH_ClientSocketHandle_ 1
28 #include "Utils/IteratorTraits.hh"
30 ///////////////////////////////ih.p////////////////////////////////////////
35 ///////////////////////////////////////////////////////////////////////
36 // senf::detail::ReadRange
38 /** \brief Internal: Choose optimal read implementation
42 If the range iterator is a contiguous_storage_iterator, the data is *directly* read into the
43 range, otherwise a temporary storage area is used.
45 template <class Handle, class ForwardWritableRange, bool IsContiguous>
48 static typename boost::range_iterator<ForwardWritableRange>::type
49 read(Handle & handle, ForwardWritableRange & range);
51 static typename boost::range_iterator<ForwardWritableRange>::type
52 readfrom(Handle & handle, ForwardWritableRange & range, typename Handle::Address & addr);
57 template <class Handle, class ForwardWritableRange>
58 struct ReadRange<Handle, ForwardWritableRange, true>
60 static typename boost::range_iterator<ForwardWritableRange>::type
61 read(Handle & handle, ForwardWritableRange & range);
63 static typename boost::range_iterator<ForwardWritableRange>::type
64 readfrom(Handle & handle, ForwardWritableRange & range, typename Handle::Address & addr);
69 ///////////////////////////////////////////////////////////////////////
70 // senf::detail::WriteRange
72 /** \brief Internal: Choose optimal write implementation
76 If the range iterator is a contiguous_storage_iterator, the data is *directly* written from
77 the range, otherwise a temporary storage area is used.
79 template <class Handle, class ForwardReadableRange, bool IsContiguous>
82 static typename boost::range_iterator<ForwardReadableRange>::type
83 write(Handle & handle, ForwardReadableRange & range);
85 static typename boost::range_iterator<ForwardReadableRange>::type
86 writeto(Handle & handle, ForwardReadableRange & range,
87 typename Handle::Address const & addr);
92 template <class Handle, class ForwardReadableRange>
93 struct WriteRange<Handle, ForwardReadableRange, true>
95 static typename boost::range_const_iterator<ForwardReadableRange>::type
96 write(Handle & handle, ForwardReadableRange & range);
98 static typename boost::range_const_iterator<ForwardReadableRange>::type
99 writeto(Handle & handle, ForwardReadableRange & range,
100 typename Handle::Address const & addr);
107 ///////////////////////////////ih.e////////////////////////////////////////
114 // c-file-style: "senf"
115 // indent-tabs-mode: nil
116 // ispell-local-dictionary: "american"
117 // compile-command: "scons -u test"
118 // comment-column: 40