The stream adapters are implemented as adapters of stream instances.
Are the decorator streams also implemented as adapters of stream instances? What design pattern are they implemented?
Note that decorator streams are implemented as derived classes of System.Stream
or of its derived classes, while stream adapters are not (but via composition which I guess). So I wonder if adapter patterns can be implemented via either composition or inheritance?
Thanks.
Aucun commentaire:
Enregistrer un commentaire