boost-users-bounces@lists.boost.org, le 8 janvier 2008 06:40:
I want to write a filter but this filter needs to do some things when the stream is ending. Is it enough to do the following? I want the close function to be called at the end of the stream. Do I need to category_flag to inherit from (closable_tag)?
class my_filter : public io::dual_use_filter { public: template<typename Source> int get(Source&) ; template<typename Sink> bool put(Sink&, int) ; template<typename Device> void close(Device&, std::ios_base::openmode) ; } ;
Well, there's nothing like trying it out but, from the docs:
- A dual_use_filter is a typedef for filter