X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketHandle.hh;h=6d36be8c225dd3951c65a0400d02dbaa928cc197;hb=1d9b6ad3acfb5059ecb461286de0dc11a9da9851;hp=be6e23af43bd4005a731d2b785be04cf71807151;hpb=1ad3873b372da6187b1fbc645bf276287d2efb54;p=senf.git diff --git a/Socket/SocketHandle.hh b/Socket/SocketHandle.hh index be6e23a..6d36be8 100644 --- a/Socket/SocketHandle.hh +++ b/Socket/SocketHandle.hh @@ -1,9 +1,9 @@ // $Id:SocketHandle.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // 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 @@ -44,26 +44,28 @@ namespace senf { /** \brief basic SocketHandle supporting protocol and policy abstraction - The senf::SocketHandle class introduces the two abstraction layers of the socket + The %senf::SocketHandle class introduces the two abstraction layers of the socket library. senf::SocketHandle does \e not provide socket functions it only provides the infrastructure necessary to support both, the protocol and the policy interface. - senf::SocketHandle takes the socket policy as a template argument. senf::SocketHandle also + %SocketHandle takes the socket policy as a template argument. %SocketHandle also introduces the protocol class. However, the class has no public constructors (see the derived classes senf::ProtocolClientSocketHandle and senf::ProtocolServerSocketHandle). - The most important functionality provided by senf::SocketHandle is the conversion + The most important functionality provided by %SocketHandle is the conversion constructor. This allows to implicitly convert between compatible socket handle types as specified by the socket policy. The conversion constructor is defined in such a way, that only valid conversions are possible (see the implementation source for a more complete discussion). + \tparam SPolicy socket policy + \note This class is \e not meant to be used as a base-class outside the library implementation; The protected interface is for internal use only. \todo Create a SocketHandleBase class and move some non-Policy dependent code there */ - template + template class SocketHandle : public FileHandle { @@ -71,7 +73,7 @@ namespace senf { /////////////////////////////////////////////////////////////////////////// // Types - typedef SocketPolicy Policy; + typedef SPolicy Policy; /** \brief Check policy compatibility @@ -81,8 +83,7 @@ namespace senf { */ template struct IsCompatible - : public boost::enable_if< SocketPolicyIsBaseOf, - SocketHandle > + : public boost::enable_if< SocketPolicyIsBaseOf, SocketHandle > {}; /////////////////////////////////////////////////////////////////////////// @@ -126,7 +127,7 @@ namespace senf { \param map string to string mapping to be filled with state information - \param lod level of detail requested. The + \param lod level of %detail requested. The interpretation of this value is protocol specific \implementation This member will be re-implemented in @@ -139,7 +140,7 @@ namespace senf { /**< Formats the complete state map value and returns it as a single multi-line string. - \param lod level of detail requested. The + \param lod level of %detail requested. The interpretation of this value is protocol specific \implementation This member will be re-implemented in @@ -147,7 +148,7 @@ namespace senf { documentation. */ protected: - explicit SocketHandle(std::auto_ptr protocol, bool isServer); + explicit SocketHandle(std::auto_ptr body); ///< Initialize SocketHandle providing the protocol /**< \param protocol Protocol class of the protocol implemented by this socket handle @@ -200,8 +201,8 @@ namespace senf { \related senf::SocketHandle */ - template - std::ostream & operator<<(std::ostream & os, SocketHandle handle); + template + std::ostream & operator<<(std::ostream & os, SocketHandle handle); /** \brief static socket (down-)cast