Move include files in debian packge into 'senf' subdirectory
[senf.git] / Socket / FileHandle.cci
index f66a348..312bc4e 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 //
-// Copyright (C) 2006 
+// Copyright (C) 2006
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
 //     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
@@ -28,7 +28,7 @@
 
 // Custom includes
 #include <errno.h>
-#include "Utils/Exception.hh"
+#include "../Utils/Exception.hh"
 
 #define prefix_ inline
 ///////////////////////////////cci.p///////////////////////////////////////
@@ -171,7 +171,7 @@ prefix_ bool senf::FileHandle::eof()
 prefix_ bool senf::FileHandle::valid()
     const
 {
-    return body().valid();
+    return body_ && body().valid();
 }
 
 prefix_ bool senf::FileHandle::boolean_test()
@@ -186,18 +186,24 @@ prefix_ int senf::FileHandle::fd()
     return body().fd();
 }
 
+prefix_ senf::FileHandle::FileHandle()
+    : body_(0)
+{}
+
 prefix_  senf::FileHandle::FileHandle(std::auto_ptr<FileBody> body)
     : body_(body.release())
 {}
 
 prefix_ senf::FileBody & senf::FileHandle::body()
 {
+    BOOST_ASSERT(body_);
     return *body_;
 }
 
 prefix_ senf::FileBody const & senf::FileHandle::body()
     const
 {
+    BOOST_ASSERT(body_);
     return *body_;
 }
 
@@ -240,5 +246,10 @@ prefix_ int senf::retrieve_filehandle(FileHandle handle)
 \f
 // Local Variables:
 // mode: c++
+// fill-column: 100
 // c-file-style: "senf"
+// indent-tabs-mode: nil
+// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: