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 Console::ConsoleConduit Console::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.Bits style, bool seekable)
 this (FileDevice device)
void close ()
 ~this ()
uint bufferSize ()

Protected Member Functions

char[] getName ()

Private Member Functions

abstract uint reader (void[] dst)
abstract uint writer (void[] src)
bool flush (void[] src)
void attach (IConduitFilter filter)
void bind (IConduit conduit, IConduitFilter next)
void unbind ()
uint read (void[] dst)
uint write (void[] src)
bool isSeekable ()
bool isReadable ()
bool isWritable ()
bool isTextual ()
IConduit copy (IConduit source)
ConduitStyle Bits getStyle ()

Static Private Member Functions

static bool isHalting ()

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 55 of file DeviceConduit.d.


Member Typedef Documentation

typedef Conduit copy copy
 

Reimplemented in FileConduit, and Console::ConsoleConduit.

Definition at line 58 of file DeviceConduit.d.

typedef Conduit read read
 

Reimplemented in FileConduit, and Console::ConsoleConduit.

Definition at line 59 of file DeviceConduit.d.

typedef Conduit write write
 

Reimplemented in FileConduit, and Console::ConsoleConduit.

Definition at line 60 of file DeviceConduit.d.


Constructor & Destructor Documentation

~this  )  [inline]
 

Make a reasonable attempt to clean up

Definition at line 110 of file DeviceConduit.d.


Member Function Documentation

this ConduitStyle.Bits  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 69 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 Console::ConsoleConduit.

Definition at line 82 of file DeviceConduit.d.

void close  )  [inline]
 

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 98 of file DeviceConduit.d.

Referenced by FileBucket::close(), ServletResponse::copyFile(), Properties::load(), and UnicodeFileTemplate().

uint bufferSize  )  [inline]
 

Return a preferred size for buffering conduit I/O

Reimplemented from Conduit.

Definition at line 122 of file DeviceConduit.d.

char [] getName  )  [inline, protected]
 

Return the name of this device

Reimplemented in FileConduit, and Console::ConsoleConduit.

Definition at line 133 of file DeviceConduit.d.

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

abstract uint reader void[]  dst  )  [protected, pure virtual, inherited]
 

conduit-specific reader

Reimplemented from IConduitFilter.

Implemented in Socket.

abstract uint writer void[]  src  )  [protected, pure virtual, inherited]
 

conduit-specific writer

Reimplemented from IConduitFilter.

Implemented in Socket.

bool flush void[]  src  )  [inline, inherited]
 

flush provided content to the conduit

Reimplemented from IConduit.

Definition at line 132 of file Conduit.d.

References Conduit::write().

void attach IConduitFilter  filter  )  [inline, inherited]
 

Please refer to IConduit.attach for details

Reimplemented from IConduit.

Definition at line 150 of file Conduit.d.

References IConduitFilter::bind().

void bind IConduit  conduit,
IConduitFilter  next
[inline, protected, inherited]
 

Reimplemented from IConduitFilter.

Definition at line 159 of file Conduit.d.

void unbind  )  [inline, protected, inherited]
 

Reimplemented from IConduitFilter.

Definition at line 167 of file Conduit.d.

uint read void[]  dst  )  [inline, inherited]
 

read from conduit into a target buffer

Reimplemented from IConduit.

Definition at line 177 of file Conduit.d.

References Conduit::filter, and IConduitFilter::reader().

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

uint write void[]  src  )  [inline, inherited]
 

write to conduit from a source buffer

Reimplemented from IConduit.

Definition at line 188 of file Conduit.d.

References Conduit::filter, and IConduitFilter::writer().

Referenced by Conduit::flush(), and DeviceConduit::VersionPosix::writer().

bool isSeekable  )  [inline, inherited]
 

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

Reimplemented from IConduit.

Definition at line 200 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 211 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 222 of file Conduit.d.

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

bool isTextual  )  [inline, inherited]
 

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(), Conduit::style, and ConduitStyle::Text.

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 245 of file Conduit.d.

References Buffer, and buffer.

ConduitStyle Bits getStyle  )  [inline, inherited]
 

Return the style used when creating this conduit

Definition at line 264 of file Conduit.d.

References Conduit::style.

static bool isHalting  )  [inline, static, inherited]
 

Is the application terminating?

Definition at line 275 of file Conduit.d.

References halting.


The documentation for this class was generated from the following file:
Generated on Sat Dec 24 17:28:38 2005 for Mango by  doxygen 1.4.0