Inheritance diagram for Conduit:
Public Member Functions | |
uint | bufferSize () |
this (ConduitStyle.Bits style, bool seekable) | |
void | close () |
bool | flush (void[] src) |
void | attach (IConduitFilter filter) |
uint | read (void[] dst) |
uint | write (void[] src) |
bool | isSeekable () |
bool | isReadable () |
bool | isWritable () |
bool | isTextual () |
IConduit | copy (IConduit source) |
ConduitStyle Bits | getStyle () |
Static Public Member Functions | |
static bool | isHalting () |
Protected Member Functions | |
abstract uint | reader (void[] dst) |
abstract uint | writer (void[] src) |
void | bind (IConduit conduit, IConduitFilter next) |
void | unbind () |
Private Types | |
enum | { Eof = uint.max } |
Private Attributes | |
ConduitStyle Bits | style |
IConduitFilter | filter |
bool | seekable |
Conduits provide virtualized access to external content, and represent things like files or Internet connections. Conduits are modelled by mango.io.model.IConduit, and implemented via classes FileConduit and SocketConduit.
Additional kinds of conduit are easy to construct: one either subclasses mango.io.Conduit, or implements mango.io.model.IConduit. A conduit typically reads and writes from/to an IBuffer in large chunks, typically the entire buffer. Alternatively, one can invoke read(dst[]) and/or write(src[]) directly.
Definition at line 66 of file Conduit.d.
|
Declare the End Of File identifer Definition at line 64 of file IConduit.d. |
|
Return a preferred size for buffering conduit I/O Reimplemented from IConduit. Reimplemented in DeviceConduit, and Socket. |
|
conduit-specific reader Reimplemented from IConduitFilter. Implemented in Socket. |
|
conduit-specific writer Reimplemented from IConduitFilter. Implemented in Socket. |
|
Construct a conduit with the given style and seek abilities. Conduits are either seekable or non-seekable. Reimplemented in DeviceConduit. |
|
Method to close the filters. This is invoked from the Resource base-class when the resource is being closed. You should ensure that a subclass invokes this as part of its closure mechanics. Reimplemented from IConduit. Reimplemented in DeviceConduit, Socket, and SocketConduit. Definition at line 120 of file Conduit.d. References filter, and IConduitFilter::unbind(). Referenced by FileConduit::copy(). |
|
flush provided content to the conduit Reimplemented from IConduit. Definition at line 132 of file Conduit.d. References write(). |
|
Please refer to IConduit.attach for details Reimplemented from IConduit. Definition at line 150 of file Conduit.d. References IConduitFilter::bind(). |
|
Reimplemented from IConduitFilter. |
|
Reimplemented from IConduitFilter. |
|
read from conduit into a target buffer Reimplemented from IConduit. Definition at line 177 of file Conduit.d. References filter, and IConduitFilter::reader(). Referenced by DeviceConduit::VersionPosix::reader(). |
|
write to conduit from a source buffer Reimplemented from IConduit. Definition at line 188 of file Conduit.d. References filter, and IConduitFilter::writer(). Referenced by flush(), and DeviceConduit::VersionPosix::writer(). |
|
Returns true if this conduit is seekable (whether it implements ISeekable) Reimplemented from IConduit. Definition at line 200 of file Conduit.d. References seekable. |
|
Returns true is this conduit can be read from Reimplemented from IConduit. Definition at line 211 of file Conduit.d. References ConduitStyle::access(), ConduitStyle::Read, and style. |
|
Returns true if this conduit can be written to Reimplemented from IConduit. Definition at line 222 of file Conduit.d. References ConduitStyle::access(), style, and ConduitStyle::Write. |
|
Returns true if this conduit is text-based Reimplemented from IConduit. Reimplemented in SocketConduit. Definition at line 233 of file Conduit.d. References ConduitStyle::access(), style, and ConduitStyle::Text. |
|
Transfer the content of another conduit to this one. Returns a reference to this class, and throws IOException on failure. Reimplemented from IConduit. |
|
Return the style used when creating this conduit Definition at line 264 of file Conduit.d. References style. |
|
Is the application terminating? Definition at line 275 of file Conduit.d. References halting. |
|
Definition at line 68 of file Conduit.d. Referenced by getStyle(), isReadable(), isTextual(), isWritable(), FileDevice::this(), and this(). |
|
|
|
Definition at line 70 of file Conduit.d. Referenced by isSeekable(), and this(). |