// $Id$
//
-// Copyright (C) 2006
+// Copyright (C) 2006
// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
// Stefan Bund <stefan.bund@fokus.fraunhofer.de>
// Custom includes
#include <errno.h>
-#include "Utils/Exception.hh"
+#include "../Utils/Exception.hh"
#define prefix_ inline
///////////////////////////////cci.p///////////////////////////////////////
prefix_ bool senf::FileHandle::valid()
const
{
- return body().valid();
+ return body_ && body().valid();
}
prefix_ bool senf::FileHandle::boolean_test()
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_;
}
\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: