Streaming transport interfaces: input
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Oct 14 10:42:04 PDT 2010
With generic element type:
interface InputBinaryTransport(T) : TransportBase
if (!hasPointers!T && !is(T == class))
{
/// Reads up to target.length items into target,
/// returns number of items read. If target.length < 1 throws.
size_t read(T[] target);
/// Appends to target up until delimiter is found or end of stream.
/// The delimiter is included in the target. Returns number
/// of items read.
size_t appendDelim(ref T[] target, in T[] delimiter);
}
The rest of the transport interfaces stays the same.
Andrei
More information about the Digitalmars-d
mailing list