Boost logo

Boost Users :

From: Edward Diener (eldiener_at_[hidden])
Date: 2008-04-28 12:31:38


I have a filter, derived from multichar_output_filter, in which I am
both prepending data and appending data. In other words the data being
written to the sink will be greater than the data being passed into the
       filter's 'template<typename Sink> std::streamsize write(Sink&
dest, const char* s, std::streamsize n)' member function, which my
filter is implementing.

Is this an allowable use of filters ?

Do I still return the 'n' streamsize data being passed in or do I return
the actual length of the data being written ?

Can I use the

'template<typename T> std::streamsize write( T& t, const typename
char_type_of<T>::type* s, std::streamsize n );'

function to write the data, or do I need to 'put' each character to the
sink using the

'template<typename Sink> void put(Sink& snk, typename
char_type_of<Sink>::type c);'

function instead ?


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net