X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocolClientSocketHandle.hh;h=f64848b6c60779824a8a6d19f00369c5ea8eb0bd;hb=31d85cd6b8e03c5ecc924ca8892906be1bab702f;hp=eeca1e7622ec7084a680c5c883d8f549be216327;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Socket/ProtocolClientSocketHandle.hh b/Socket/ProtocolClientSocketHandle.hh index eeca1e7..f64848b 100644 --- a/Socket/ProtocolClientSocketHandle.hh +++ b/Socket/ProtocolClientSocketHandle.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -20,6 +20,10 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/** \file + \brief ProtocolClientSocketHandle public header + */ + #ifndef HH_ProtocolClientSocketHandle_ #define HH_ProtocolClientSocketHandle_ 1 @@ -29,12 +33,28 @@ #include "ProtocolClientSocketHandle.mpp" ///////////////////////////////hh.p//////////////////////////////////////// -namespace satcom { -namespace lib { +namespace senf { + + /// \addtogroup handle_group + /// @{ template class ProtocolServerSocketHandle; - /** \brief + /** \brief Protocol specific socket handle (client interface) + + The ProtocolClientSocketHandle is the client interface leaf class of the handle + hierarchy. This is the class to instantiate to open a new socket. This is also the \e only + class, which can be used to open a client socket. + + The \a Protocol template argument defines the protocol of the socket. This protocol provides + the protocol interface of the socket as well as the complete socket policy of this protocol. + + The ProtocolClientSocketHandle adds the protocol interface as an additional interface to the + socket handle. This interface is only accessible via the protocol class. All socket + functionality not available through the policy interface (see ClientSocketHandle) is + accessible via the protocol() member. + + \see \ref protocol_group */ template class ProtocolClientSocketHandle @@ -44,21 +64,46 @@ namespace lib { /////////////////////////////////////////////////////////////////////////// // Types - typedef SocketProtocol Protocol; + typedef SocketProtocol Protocol; ///< The sockets protocol + enum UninitializedType { Uninitialized }; ///< Flag to call 'uninitialized' constructor /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members ///@{ + /** \brief Create new client socket + + This constructor is one of the possible constructors. The exact Signature of the + constructor (or constructors) is defined by the \c init_client() member (or members) of + the \a Protocol class. ProtocolClientSocketHandle defines a number of constructors + taking up to 9 arguments which just forward to a corresponding \a Protocol\c + ::init_client() member. See the documentation of the respective Protocol class for a + detailed documentation of that protocols constructors. + */ ProtocolClientSocketHandle(); # define BOOST_PP_ITERATION_PARAMS_1 (4, (1, 9, "Socket/ProtocolClientSocketHandle.mpp", 1)) # include BOOST_PP_ITERATE() - + + /** \brief Create uninitialized socket variable + + This special constructor is called when passing + ProtocolClientSocketHandle::Uninitialized as only argument to the constructor. This will + create an in-\ref valid() socket handle which can however be assigned later with another + socket instance. + + \implementation The socket handle will have no \c body allocated. + */ + ProtocolClientSocketHandle(UninitializedType); + ///@} /////////////////////////////////////////////////////////////////////////// - Protocol const & protocol(); + Protocol const & protocol(); ///< Access the protocol interface + /**< The returned protocol class reference gives access to + the complete protocol interface as defined by that + class. See the respective protocol class documentation. + \returns \a Protocol class reference */ static ProtocolClientSocketHandle cast_static(FileHandle handle); static ProtocolClientSocketHandle cast_dynamic(FileHandle handle); @@ -73,7 +118,8 @@ namespace lib { friend class ProtocolServerSocketHandle; }; -}} + /// @} +} ///////////////////////////////hh.e//////////////////////////////////////// //#include "ProtocolClientSocketHandle.cci" @@ -85,5 +131,9 @@ namespace lib { // 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" // End: