X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketHandle.hh;h=d8f71de390351a55a207ae43e2b50ca4ff02f06d;hb=5a5c6d7f0fae7ad6c0af49d7742955cb6cf618cf;hp=8f10b4a83877023b6d4399f3b650c3d7f71a8b21;hpb=70256cc93f59f5d2c9b3428775a181e5e225bfc5;p=senf.git diff --git a/Socket/SocketHandle.hh b/Socket/SocketHandle.hh index 8f10b4a..d8f71de 100644 --- a/Socket/SocketHandle.hh +++ b/Socket/SocketHandle.hh @@ -39,6 +39,8 @@ namespace senf { + /// \addtogroup handle_group + /// @{ /** \brief basic SocketHandle supporting protocol and policy abstraction @@ -110,55 +112,67 @@ namespace senf { void state(SocketStateMap & map, unsigned lod=0); ///< Inquire state information of socket handle /**< The map argument (a string to string mapping) will be - filled with information coverning the current state of - the socket. The information provided depends on the - socket protocol. The amount of information returned can - be controlled using the \p lod value. - - See senf::SocketProtocol::state() for more information, - how the Information is generated. - - \param map string to string mapping to be filled with - state information - \param lod level of detail requesten. The interpretation - of this value is protocol specific */ + filled with information coverning the current state of + the socket. The information provided depends on the + socket protocol. The amount of information returned can + be controlled using the \p lod value. + + See senf::SocketProtocol::state() for more information, + how the Information is generated. + + \param map string to string mapping to be filled with + state information + \param lod level of detail requesten. The interpretation + of this value is protocol specific + + \implementation This member will be re-implemented in + every derived class. This is very important since + state() is \e not a virtual function (which we + don't want since we don't want to add a vtable + pointer to every handle instance). */ std::string dumpState(unsigned lod=0); ///< Format complete state information as string /**< Formats the complete state map value and returns it as - a single multi-line string. */ + a single multi-line string. + + \implementation This member will be re-implemented in + every derived class. See the state() + documentation. */ protected: explicit SocketHandle(std::auto_ptr protocol, bool isServer); ///< Initialize SocketHandle providing the protocol /**< \param protocol Protocol class of the protocol implemented by this socket handle - \param isServer \c true, if this SocketHandle instance + \param isServer \c true, if this SobcketHandle instance implements a server handle, \c false otherwise */ SocketHandle(FileHandle other, bool isChecked); ///< Initialize SocketHandle from arbitrary checked ///< FileHandle /**< This constructor is used to support up- and downcasting - of SocketHandle instances. + of SocketHandle instances. - \warning It is absolutely necessary to ensure, that the - FileHandle passed in is \e really a SocketHandle holding - a SocketBody (and not a simple FileBody) - instance. Additionally. the SocketPolicy absolutely must - be compatible. + \warning It is absolutely necessary to ensure, that the + FileHandle passed in is \e really a SocketHandle + holding a SocketBody (and not a simple FileBody) + instance. Additionally. the SocketPolicy absolutely + must be compatible. - \param other FileHandle to assign - \param isChecked has to be \c true + \param other FileHandle to assign + \param isChecked has to be \c true - \todo Answer, why the heck I need the \c isChecked - parameter ?? + \todo Answer, why the heck I need the \c isChecked + parameter ?? */ SocketBody & body(); ///< Access socket body /**< This member replaces the corresponding FileHandle - member and returns an appropriately cast body reference */ + member and returns an appropriately cast body + reference */ SocketBody const & body() const; ///< Access socket body in const context /**< This member replaces the corresponding FileHandle - member and returns an appropriately cast body reference */ + member and returns an appropriately cast body + reference */ SocketProtocol const & protocol() const; ///< Access protocol class @@ -166,7 +180,9 @@ namespace senf { public: static SocketHandle cast_static(FileHandle handle); + /**< \internal */ static SocketHandle cast_dynamic(FileHandle handle); + /**< \internal */ private: @@ -225,6 +241,8 @@ namespace senf { */ template bool check_socket_cast(Source handle); + + /// @} } ///////////////////////////////hh.e////////////////////////////////////////