5 #ifndef HH_WriteHelper_
6 #define HH_WriteHelper_ 1
10 #include <boost/intrusive_ptr.hpp>
11 #include <boost/function.hpp>
12 #include "Utils/intrusive_refcount.hh"
13 #include "Scheduler.hh"
15 //#include "WriteHelper.mpp"
16 ///////////////////////////////hh.p////////////////////////////////////////
21 template <class Handle>
23 : public satcom::lib::intrusive_refcount
26 ///////////////////////////////////////////////////////////////////////////
29 typedef boost::intrusive_ptr<WriteHelper> ptr;
30 typedef boost::function<void (ptr)> Callback;
32 ///////////////////////////////////////////////////////////////////////////
33 ///\name Structors and default members
36 static ptr dispatch(Handle handle, std::string data, Callback callback);
39 ///////////////////////////////////////////////////////////////////////////
41 Handle handle() const;
43 std::string const & data() const;
45 bool complete() const;
47 void throw_error() const;
54 WriteHelper(Handle handle, std::string data, Callback callback);
56 static void dispatchProcess(ptr helper, Handle handle, satcom::lib::Scheduler::EventId event);
57 void process(Handle handle, satcom::lib::Scheduler::EventId event);
61 mutable std::string data_;
64 mutable std::string::size_type offset_;
71 ///////////////////////////////hh.e////////////////////////////////////////
72 //#include "WriteHelper.cci"
73 #include "WriteHelper.ct"
74 #include "WriteHelper.cti"
75 //#include "WriteHelper.mpp"