removed some useless spaces; not very important, I know :)
[senf.git] / Socket / ReadWritePolicy.cti
index f4f7f84..3ff2606 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
-// Copyright (C) 2006 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Copyright (C) 2006
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -20,7 +20,9 @@
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-// Definition of inline template functions
+/** \file
+    \brief ReadPolicy and WritePolicy inline template implementation
+ */
 
 //#include "ReadWritePolicy.ih"
 
 #define prefix_ inline
 ///////////////////////////////cti.p///////////////////////////////////////
 
-template <class Policy>
-prefix_ unsigned satcom::lib::ReadablePolicy::
-readfrom(ClientSocketHandle<Policy> handle, char * buffer, unsigned size,
-         typename Policy::AddressingPolicy::Address & address,
-         typename IfCommunicationPolicyIs<Policy,UnconnectedCommunicationPolicy>::type *)
+#ifndef DOXYGEN
+template <class SPolicy>
+prefix_ unsigned senf::ReadablePolicy::
+readfrom(ClientSocketHandle<SPolicy> handle, char * buffer, unsigned size,
+         typename SPolicy::AddressingPolicy::Address & address,
+         typename IfCommunicationPolicyIs<SPolicy,UnconnectedCommunicationPolicy>::type *)
 {
     return do_rcvfrom(handle, buffer, size, address.sockaddr_p(), address.sockaddr_len());
 }
+#else
+template <class SPolicy>
+prefix_ unsigned senf::ReadablePolicy::
+readfrom(ClientSocketHandle<SPolicy> handle, char * buffer, unsigned size,
+         typename Policy::AddressingPolicy::Address & address)
+{}
+#endif
 
-template <class Policy>
-prefix_ unsigned satcom::lib::WriteablePolicy::
-write(ClientSocketHandle<Policy> handle, char const * buffer, unsigned size,
-      typename IfCommunicationPolicyIs<Policy,ConnectedCommunicationPolicy>::type *)
+#ifndef DOXYGEN
+template <class SPolicy>
+prefix_ unsigned senf::WriteablePolicy::
+write(ClientSocketHandle<SPolicy> handle, char const * buffer, unsigned size,
+      typename IfCommunicationPolicyIs<SPolicy,ConnectedCommunicationPolicy>::type *)
 {
     return do_write(handle,buffer,size);
 }
+#else
+template <class SPolicy>
+prefix_ unsigned senf::WriteablePolicy::
+write(ClientSocketHandle<SPolicy> handle, char const * buffer, unsigned size)
+{}
+#endif
 
-template <class Policy>
-prefix_ unsigned satcom::lib::WriteablePolicy::
-writeto(ClientSocketHandle<Policy> handle,
-        typename boost::call_traits<typename Policy::AddressingPolicy::Address>::param_type addr,
+#ifndef DOXYGEN
+template <class SPolicy>
+prefix_ unsigned senf::WriteablePolicy::
+writeto(ClientSocketHandle<SPolicy> handle,
+        typename boost::call_traits<typename SPolicy::AddressingPolicy::Address>::param_type addr,
         char const * buffer, unsigned size,
-        typename IfCommunicationPolicyIs<Policy,UnconnectedCommunicationPolicy>::type *)
+        typename IfCommunicationPolicyIs<SPolicy,UnconnectedCommunicationPolicy>::type *)
 {
     return do_writeto(handle, buffer, size, addr.sockaddr_p(), addr.sockaddr_len());
 }
+#else
+template <class SPolicy>
+prefix_ unsigned senf::WriteablePolicy::
+writeto(ClientSocketHandle<SPolicy> handle,
+        typename Policy::AddressingPolicy::Address const & addr,
+        char const * buffer, unsigned size)
+{}
+#endif
 
 ///////////////////////////////cti.e///////////////////////////////////////
 #undef prefix_
@@ -62,5 +88,10 @@ writeto(ClientSocketHandle<Policy> handle,
 \f
 // Local Variables:
 // mode: c++
-// c-file-style: "satcom"
+// fill-column: 100
+// c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: