// $Id$ // // Copyright (C) 2006 // Definition of inline template functions #include "ReadHelper.ih" // Custom includes #include "Utils/Exception.hh" #define prefix_ inline ///////////////////////////////cti.p/////////////////////////////////////// template prefix_ typename senf::ReadHelper::ptr senf::ReadHelper::dispatch(Handle handle, std::string::size_type maxSize, Callback callback) { return ptr(new ReadHelper(handle, maxSize, 0, callback)); } template template prefix_ typename senf::ReadHelper::ptr senf::ReadHelper::dispatch(Handle handle, std::string::size_type maxSize, Predicate predicate, Callback callback) { return ptr(new ReadHelper(handle, maxSize, new typename InternalPredicate::template Dispatcher(predicate), callback)); } template prefix_ Handle senf::ReadHelper::handle() const { return handle_; } template prefix_ unsigned senf::ReadHelper::maxSize() const { return maxSize_; } template prefix_ std::string const & senf::ReadHelper::data() const { return data_; } template prefix_ std::string const & senf::ReadHelper::tail() const { return tail_; } template prefix_ bool senf::ReadHelper::complete() const { return complete_; } template prefix_ bool senf::ReadHelper::error() const { return errno_ != 0; } template prefix_ void senf::ReadHelper::throw_error() const { if (errno_ != 0) throw SystemException(errno_); } ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_ // Local Variables: // mode: c++ // End: