Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1837 (new enhancement)

Opened 14 years ago

Add protected resetFilter method to InputFilter/OutputFilter

Reported by: DRK Assigned to: kris
Priority: minor Milestone: 2.0
Component: IO Version: 0.99.8 Sean
Keywords: Cc:

Description

The Zlib filter streams have a reset method due to the high cost of creating instances. This reset method, among other things, allows the underlying stream to be switched to another one.

Currently, this simply involves overwriting the existing source/sink member. However, this is somewhat brittle in that if the Filter base classes' ctor behaviour becomes more complex, reset will break.

It may be useful to add a protected, final method called "resetFilter" or "resetSource"/"resetSink" or somesuch to the base classes.