June 20, 2005
Being dissatisfied with the current stream implementation (no offence intended Ben you do some great work) I've had a play with various stream ideas.

I keep coming back to seperating input and output, it makes the most sense to me, but it's not my preffered choice for usability i.e. it's nice to have a single object/class and both read and write to/from it. I can't seem to achieve this, how I'd like, without some sort of multiple inheritance.

What are peoples favourite stream libraries (I've poked my nose into the Java one and the mango one, what else should I look at for inspiration).

I found a good solution to the whole seekability problem. You define a seekable interface, eg.

interface ISeekable
  size_t seek(size_t offset, SeekPos from);

then you can use "static if" to check for seekability (rather than having a boolean flag in the class. The same applies to readability and writability. This way you can have compile time checking (I believe).

Next ›   Last »
1 2
Top | Discussion index | About this forum | D home