X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FFileHandle.hh;h=d2c93b61c63bcfa04b94043b7c19a99cb286a397;hb=70633abc330f835e2ae9e50d2b7e8f8f710d3dc6;hp=9a8c7e7d5b7d015353e74589b9f57094729cc40b;hpb=032707d24b1059febe83ce56b11fd79df106c6e2;p=senf.git diff --git a/Socket/FileHandle.hh b/Socket/FileHandle.hh index 9a8c7e7..d2c93b6 100644 --- a/Socket/FileHandle.hh +++ b/Socket/FileHandle.hh @@ -20,6 +20,10 @@ // Free Software Foundation, Inc., // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/** \file + \brief senf::FileHandle public header + */ + #ifndef HH_FileHandle_ #define HH_FileHandle_ 1 @@ -105,19 +109,27 @@ namespace senf { bool eof() const; ///< Check EOF condition /**< Depending on the socket type, this might never return \p - true */ + true. + + This member is somewhat problematic performance wise if + called frequently since it relies on virtual + functions. However, since the eof() handling is extremely + protocol dependent, a policy based implementation does not + seam feasible. */ bool valid() const; ///< Check filehandle validity /**< Any operation besides valid() will fail on an invalid FileHandle */ bool boolean_test() const; ///< Short for valid() && ! eof() /**< This is called when using a FileHandle instance in a boolen - context */ + context + + See the performance comments for the eof() member */ int fd() const; ///< Return the raw FileHandle - static FileHandle cast_static(FileHandle handle); ///< \internal - static FileHandle cast_dynamic(FileHandle handle); ///< \internal + static FileHandle cast_static(FileHandle handle); /**< \internal */ + static FileHandle cast_dynamic(FileHandle handle); /**< \internal */ protected: explicit FileHandle(std::auto_ptr body);