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

Console::ConsoleConduit Class Reference

Inheritance diagram for Console::ConsoleConduit:

DeviceConduit DeviceConduit List of all members.

Public Types

typedef DeviceConduit copy copy
typedef DeviceConduit read read
typedef DeviceConduit write write

Public Member Functions

package this (FileDevice device)
void setTranscode (bool enabled)

Protected Member Functions

char[] getName ()

Private Member Functions

IConduit copy (IConduit source)
uint read (void[] dst)
uint write (void[] src)
 this (ConduitStyle.Bits style, bool seekable)
void close ()
uint bufferSize ()
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 ()
bool isSeekable ()
bool isReadable ()
bool isWritable ()
bool isTextual ()
ConduitStyle Bits getStyle ()

Static Private Member Functions

static bool isHalting ()

Private Attributes

bool transcode = false

Classes

class  VersionWin32

Detailed Description

Conduit for specifically handling the console devices. This takes care of certain implementation details on the Win32 platform.

Note that the console is fixed at Utf8 for both linux and Win32. The latter is actually Utf16 native, but it's just too much hassle for a developer to handle the distinction when it really should be a no-brainer. In particular, the Win32 console functions don't work with redirection. This causes additional difficulties that can be ameliorated by asserting console I/O is always Utf8, in all modes.

Definition at line 149 of file Console.d.


Member Typedef Documentation

typedef DeviceConduit copy copy
 

Reimplemented from DeviceConduit.

Definition at line 142 of file Copy of Console.d.

typedef DeviceConduit read read
 

Reimplemented from DeviceConduit.

Definition at line 143 of file Copy of Console.d.

typedef DeviceConduit write write
 

Reimplemented from DeviceConduit.

Definition at line 144 of file Copy of Console.d.


Member Function Documentation

package this FileDevice  device  )  [inline]
 

Create a FileConduit on the provided FileDevice.

This is strictly for adapting existing devices such as Stdout and friends.

Reimplemented from DeviceConduit.

Definition at line 158 of file Copy of Console.d.

References buffer, setTranscode(), and version.

void setTranscode bool  enabled  )  [inline]
 

Enable or disable transcoding for Win32 console. This is not required on linux, since it is utf8 throughout.

When Win32 stdout is redirected, the content is *not* transcoded, since the unicode functions fail in such cases. Instead, the content is emitted raw.

Definition at line 180 of file Copy of Console.d.

Referenced by Console::ConsoleConduit::VersionWin32::reopen(), and this().

char [] getName  )  [inline, protected]
 

Return the name of this device

Reimplemented from DeviceConduit.

Definition at line 191 of file Copy of Console.d.

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.

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().

this ConduitStyle.Bits  style,
bool  seekable
[inline, inherited]
 

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.

void close  )  [inline, inherited]
 

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, inherited]
 

Return a preferred size for buffering conduit I/O

Reimplemented from Conduit.

Definition at line 122 of file DeviceConduit.d.

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.

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.

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.


Member Data Documentation

bool transcode = false [private]
 

Definition at line 147 of file Copy of Console.d.

Referenced by Console::ConsoleConduit::VersionWin32::write().


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