Is there any way to apply a filter temporarily ?
I want to do this...
io::filtering_ostream out;
out.push_back(file_sink("my_file.txt"));
out << "Authentication: ";
out.push_front ( base64_encoder() ); // pseudo-code... see *push_front* instead of *push*
out << make_ntlm_auth_from_system(); // this have to be base64 encoded
out.pop_front(); // removes the base64_encoder
out << "......"; // *NO* base64 encoded
I don't want to do this...
io::filtering_ostream out;
out.push(file_sink("my_file.txt"));
out << "Authentication: ";
out.pop();
out.push(base64_encoder());
out.push(file_sink("my_file.txt"));
out << make_ntlm_auth_from_system();
out.pop();
out.pop();
out.push(file_sink("my_file.txt"));
out << "......";
The function make_ntlm_auth_from_system() creates an object that is *OStreamable*.
Any other suggestions are welcome. :)
Thanks and regards,
Fernando.