Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

DeviceConduit Class Reference

Inheritance diagram for DeviceConduit:

Conduit ConsoleConduit FileConduit List of all members.

Public Types

typedef Conduit copy copy
typedef Conduit read read
typedef Conduit write write

Public Member Functions

 this (ConduitStyle style, bool seekable)
 this (FileDevice device)
IBuffer createBuffer ()

Protected Member Functions

override void closure ()
char[] getName ()

Private Member Functions

 this ()
int read (void[] dst)
int read (IBuffer target)
int write (void[] src)
int write (IBuffer source)
void attach (IConduitSource input)
void attach (IConduitSink output)
void bind (IConduitSink next)
void bind (IConduitSource next)
void unbind ()
bool isSeekable ()
bool isReadable ()
bool isWritable ()
IConduit copy (IConduit source)
ConduitStyle getStyle ()

Classes

class  VersionPosix
class  VersionWin32

Detailed Description

Implements a means of reading and writing a file device. Conduits are the primary means of accessing external data, and are usually routed through a Buffer.

Definition at line 100 of file DeviceConduit.d.


Member Typedef Documentation

typedef Conduit copy copy
 

Reimplemented in ConsoleConduit, and FileConduit.

Definition at line 103 of file DeviceConduit.d.

typedef Conduit read read
 

Reimplemented in ConsoleConduit, and FileConduit.

Definition at line 104 of file DeviceConduit.d.

typedef Conduit write write
 

Reimplemented in ConsoleConduit, and FileConduit.

Definition at line 105 of file DeviceConduit.d.


Member Function Documentation

this ConduitStyle  style,
bool  seekable
[inline]
 

Construct a conduit with the given style and seek abilities. Conduits are either seekable or non-seekable.

Reimplemented from Conduit.

Definition at line 114 of file DeviceConduit.d.

this FileDevice  device  )  [inline]
 

Create a FileConduit on the provided FileDevice. This is strictly for adapting existing devices such as Stdout and friends.

Reimplemented in ConsoleConduit.

Definition at line 127 of file DeviceConduit.d.

References Resource::acquire().

override void closure  )  [inline, protected]
 

Callback to close the file. This is invoked from the Resource base-class when the resource is being closed.

Reimplemented from Conduit.

Definition at line 146 of file DeviceConduit.d.

IBuffer createBuffer  )  [inline]
 

Create a Buffer of the default FileConduit size, and associate it with this conduit

Reimplemented from Conduit.

Definition at line 159 of file DeviceConduit.d.

References Buffer, and IBuffer::setConduit().

Referenced by testFile2(), testFile3(), testFile5(), testTeqParser(), and testToken4().

char [] getName  )  [inline, protected]
 

Return the name of this device

Reimplemented in ConsoleConduit, and FileConduit.

Definition at line 175 of file DeviceConduit.d.

Referenced by DeviceConduit::VersionPosix::error(), and DeviceConduit::VersionWin32::error().

this  )  [inline, inherited]
 

Set the default lock to be this object

Reimplemented in DatagramSocket, and SocketConduit.

Definition at line 77 of file Resource.d.

References Resource::_lock.

int read void[]  dst  )  [inherited]
 

conduit-specific reader

Reimplemented from IConduit.

Referenced by DeviceConduit::VersionPosix::read().

int read IBuffer  target  )  [inline, inherited]
 

read from conduit into a target buffer

Reimplemented from IConduit.

Definition at line 184 of file Conduit.d.

References assert().

int write void[]  src  )  [inherited]
 

conduit-specific writer

Reimplemented from IConduit.

Referenced by Conduit::copy(), and DeviceConduit::VersionPosix::write().

int write IBuffer  source  )  [inline, inherited]
 

write to conduit from a source buffer

Reimplemented from IConduit.

Definition at line 197 of file Conduit.d.

References assert().

void attach IConduitSource  input  )  [inline, inherited]
 

Please refer to IConduit.attach for details

Reimplemented from IConduit.

Definition at line 136 of file Conduit.d.

References IConduitSource::bind().

void attach IConduitSink  output  )  [inline, inherited]
 

Please refer to IConduit.attach for details

Reimplemented from IConduit.

Definition at line 148 of file Conduit.d.

References IConduitSink::bind().

void bind IConduitSink  next  )  [inline, protected, inherited]
 

Reimplemented from IConduitSink.

Definition at line 158 of file Conduit.d.

void bind IConduitSource  next  )  [inline, protected, inherited]
 

Reimplemented from IConduitSource.

Definition at line 166 of file Conduit.d.

void unbind  )  [inline, protected, inherited]
 

Reimplemented from IConduitSource.

Definition at line 174 of file Conduit.d.

bool isSeekable  )  [inline, inherited]
 

Returns true if this conduit is seekable (whether it implements ISeekable)

Reimplemented from IConduit.

Definition at line 216 of file Conduit.d.

References Conduit::seekable.

bool isReadable  )  [inline, inherited]
 

Returns true is this conduit can be read from

Reimplemented from IConduit.

Definition at line 227 of file Conduit.d.

References ConduitStyle::access(), ConduitStyle::Read, and Conduit::style.

bool isWritable  )  [inline, inherited]
 

Returns true if this conduit can be written to

Reimplemented from IConduit.

Definition at line 238 of file Conduit.d.

References ConduitStyle::access(), Conduit::style, and ConduitStyle::Write.

IConduit copy IConduit  source  )  [inline, inherited]
 

Transfer the content of another conduit to this one. Returns a reference to this class, and throws IOException on failure.

Reimplemented from IConduit.

Definition at line 250 of file Conduit.d.

References Conduit::createBuffer(), IBuffer::flush(), IConduit::read(), and Conduit::write().

ConduitStyle getStyle  )  [inline, inherited]
 

Return the style used when creating this conduit

Definition at line 269 of file Conduit.d.

References Conduit::style.


The documentation for this class was generated from the following file:
Generated on Fri Nov 11 18:44:33 2005 for Mango by  doxygen 1.4.0