Inheritance diagram for Console::Output:
Public Types | |
typedef getConduit | conduit |
Public Member Functions | |
this (FileDevice device) | |
Output | opCall (char[] x) |
this (FileDevice device) | |
int | opCall (char[] x) |
Public Attributes | |
ConsoleConduit | conduit |
Protected Member Functions | |
int | sink (void[] x, int type) |
Private Types | |
typedef uint(* | Converter )(void *dst, uint count, uint type) |
Private Member Functions | |
this (IConduit conduit) | |
this (uint capacity=0) | |
this (void[] data) | |
this (void[] data, uint readable) | |
void | error (char[] msg) |
void[] | getContent () |
Style | getStyle () |
IBuffer | setValidContent (void[] data) |
IBuffer | setContent (void[] data, uint readable=0) |
bool | grow (uint size) |
void | copy (void *src, uint size) |
void[] | get (uint size, bool eat=true) |
IBuffer | append (void[] src) |
char[] | toString () |
bool | skip (int size) |
uint | readable () |
uint | writable () |
uint | write (uint(*dg)(void[])) |
uint | read (uint(*dg)(void[])) |
IBuffer | compress () |
uint | fill () |
uint | fill (IConduit conduit) |
void | makeRoom (int space) |
uint | drain () |
void | flush () |
IBuffer | clear () |
uint | getLimit () |
uint | getCapacity () |
uint | getPosition () |
IConduit | getConduit () |
void | setConduit (IConduit conduit) |
Private Attributes | |
void[] | data |
Style | style |
uint | limit |
uint | capacity |
uint | position |
const Style | Mixed = 0 |
const Style | Binary = 1 |
const Style | Text = 2 |
Definition at line 117 of file Console.d.
|
Reimplemented from Buffer. |
|
|
|
|
|
Definition at line 126 of file Console.d. References Buffer::append(), and IBuffer::flush(). |
|
Definition at line 111 of file Copy of Console.d. References Buffer::setConduit(). |
|
Definition at line 117 of file Copy of Console.d. References Buffer::flush(), and sink(). |
|
Definition at line 124 of file Copy of Console.d. References Buffer::write(). Referenced by opCall(). |
|
Construct a Buffer upon the provided conduit Definition at line 233 of file Buffer.d. References IConduit::bufferSize(), Buffer::conduit, IConduit::isTextual(), and Buffer::setConduit(). |
|
Construct a Buffer with the specified number of bytes. Reimplemented in GrowBuffer. Definition at line 246 of file Buffer.d. References Buffer::capacity. |
|
Prime buffer with an application-supplied array. There is no readable data present, and writing begins at position 0. Definition at line 258 of file Buffer.d. References Buffer::data. |
|
Prime buffer with an application-supplied array, and indicate how much readable data is already there. A write operation will begin writing immediately after the existing content. Definition at line 272 of file Buffer.d. References Buffer::data, Buffer::readable(), and Buffer::setContent(). |
|
Throw an exception with the provided message Reimplemented from IBuffer. Definition at line 283 of file Buffer.d. Referenced by Buffer::append(), Buffer::drain(), RawCodec1::exporter(), Buffer::fill(), Buffer::flush(), Buffer::get(), and Buffer::makeRoom(). |
|
Return the backing array Reimplemented from IBuffer. Definition at line 294 of file Buffer.d. References Buffer::data. |
|
Return style of buffer Reimplemented from IBuffer. Definition at line 305 of file Buffer.d. References Buffer::style. |
|
Set the backing array with all content readable. Writing to this will either flush it to an associated conduit, or raise an Eof condition. Use IBuffer.clear() to reset the content (make it all writable). Reimplemented from IBuffer. Definition at line 319 of file Buffer.d. References Buffer::setContent(). Referenced by StartLine::VersionUseTokenizer::parse(), ResponseLine::parse(), and MappedBuffer::VersionWin32::this(). |
|
Set the backing array with some content readable. Writing to this will either flush it to an associated conduit, or raise an Eof condition. Use IBuffer.clear() to reset the content (make it all writable). Reimplemented from IBuffer. Definition at line 333 of file Buffer.d. References Buffer::readable(). Referenced by Buffer::setValidContent(), and Buffer::this(). |
|
Overridable method to grow the buffer to the specified size when it becomes full. Default is to not grow at all. Reimplemented from IBuffer. Reimplemented in GrowBuffer. Definition at line 352 of file Buffer.d. Referenced by Buffer::append(), and Buffer::makeRoom(). |
|
Bulk copy of data from 'src'. Limit is adjusted by 'size' bytes. Reimplemented in MappedBuffer. Definition at line 364 of file Buffer.d. References Buffer::data, and Buffer::limit. Referenced by Buffer::append(). |
|
Read a chunk of data from the buffer, loading from the conduit as necessary. The specified number of bytes is loaded into the buffer, and marked as having been read when the 'eat' parameter is set true. When 'eat' is set false, the read position is not adjusted. Returns the corresponding buffer slice when successful, or null if there's not enough data available (Eof; Eob). Reimplemented from IBuffer. Definition at line 383 of file Buffer.d. References Buffer::capacity, Buffer::compress(), Buffer::conduit, Buffer::data, Buffer::eofRead, Buffer::error(), Buffer::fill(), Buffer::position, Buffer::readable(), Buffer::underflow, and Buffer::writable(). Referenced by RawCodec1::exporter(), Console::Input::opCall(), and Buffer::skip(). |
|
Append an array of data to this buffer, and flush to the conduit as necessary. Returns a chaining reference if all data was written; throws an IOException indicating eof or eob if not. This is often used in lieu of a Writer. Reimplemented from IBuffer. Definition at line 424 of file Buffer.d. References Buffer::capacity, Buffer::conduit, Buffer::copy(), Buffer::error(), IConduit::flush(), Buffer::flush(), Buffer::grow(), Buffer::overflow, and Buffer::writable(). Referenced by RawCodec1::importer(), and opCall(). |
|
Return a char[] slice of the buffer up to the limit of valid content. Reimplemented from IBuffer. Definition at line 457 of file Buffer.d. References Buffer::data, Buffer::limit, and Buffer::position. Referenced by VirtualCache::put(), and HttpClient::read(). |
|
Skip ahead by the specified number of bytes, streaming from the associated conduit as necessary. Can also reverse the read position by 'size' bytes. This may be used to support lookahead-type operations. Returns true if successful, false otherwise. Reimplemented from IBuffer. Definition at line 474 of file Buffer.d. References Buffer::get(), and Buffer::position. |
|
Return count of readable bytes remaining in buffer. This is calculated simply as limit() - position() Reimplemented from IBuffer. Definition at line 496 of file Buffer.d. References Buffer::limit, and Buffer::position. Referenced by Buffer::compress(), RawCodec1::exporter(), Buffer::fill(), Buffer::get(), Console::Input::opCall(), HttpClient::open(), HttpClient::read(), Buffer::setContent(), and Buffer::this(). |
|
Return count of writable bytes available in buffer. This is calculated simply as capacity() - limit() Reimplemented from IBuffer. Reimplemented in MappedBuffer. Definition at line 508 of file Buffer.d. References Buffer::capacity, and Buffer::limit. Referenced by Buffer::append(), Buffer::fill(), and Buffer::get(). |
|
Exposes the raw data buffer at the current write position, The delegate is provided with a void[] representing space available within the buffer at the current write position. The delegate should return the appropriate number of bytes if it writes valid content, or IConduit.Eof on error. Returns whatever the delegate returns. Reimplemented from IBuffer. Reimplemented in MappedBuffer. Definition at line 526 of file Buffer.d. References assert(), Buffer::capacity, Buffer::data, and Buffer::limit. Referenced by Buffer::fill(), RawCodec1::importer1(), and sink(). |
|
Exposes the raw data buffer at the current read position. The delegate is provided with a void[] representing the available data, and should return zero to leave the current read position intact. If the delegate consumes data, it should return the number of bytes consumed; or IConduit.Eof to indicate an error. Returns whatever the delegate returns. Reimplemented from IBuffer. Definition at line 552 of file Buffer.d. References assert(), Buffer::data, Buffer::limit, and Buffer::position. Referenced by Buffer::drain(), and RawCodec1::exporter1(). |
|
If we have some data left after an export, move it to front-of-buffer and set position to be just after the remains. This is for supporting certain conduits which choose to write just the initial portion of a request. Limit is set to the amount of data remaining. Position is always reset to zero. Reimplemented from IBuffer. Reimplemented in MappedBuffer. Definition at line 577 of file Buffer.d. References Buffer::data, Buffer::limit, Buffer::position, and Buffer::readable(). Referenced by Buffer::drain(), Buffer::fill(), and Buffer::get(). |
|
Try to fill the available buffer with content from the specified conduit. In particular, we will never ask to read less than 32 bytes. This permits conduit-filters to operate within a known environment. Returns the number of bytes read, or throws an underflow error if there nowhere to read from Reimplemented from IBuffer. Definition at line 602 of file Buffer.d. References Buffer::conduit, Buffer::error(), and Buffer::underflow. Referenced by RawCodec1::exporter(), RawCodec1::exporter1(), Buffer::get(), Console::Input::opCall(), and HttpClient::read(). |
|
Try to fill the available buffer with content from the specified conduit. In particular, we will never ask to read less than 32 bytes ~ this permits conduit-filters to operate within a known environment. We also try to read as much as possible by clearing the buffer when all current content has been eaten. Returns the number of bytes read, or Conduit.Eof Reimplemented from IBuffer. Definition at line 622 of file Buffer.d. References Buffer::clear(), Buffer::compress(), Buffer::error(), IConduit::read(), Buffer::readable(), Buffer::writable(), and Buffer::write(). |
|
make some room in the buffer Reimplemented from IBuffer. Definition at line 640 of file Buffer.d. References Buffer::conduit, Buffer::drain(), Buffer::error(), Buffer::grow(), and Buffer::overflow. Referenced by RawCodec1::importer1(). |
|
Write as much of the buffer that the associated conduit can consume. Returns the number of bytes written, or Conduit.Eof Reimplemented from IBuffer. Definition at line 658 of file Buffer.d. References Buffer::compress(), Buffer::conduit, IConduit::Eof, Buffer::eofWrite, Buffer::error(), Buffer::read(), and IConduit::write(). Referenced by Buffer::makeRoom(). |
|
flush the contents of this buffer to the related conduit. Throws an IOException on premature eof. Reimplemented from IBuffer. Definition at line 675 of file Buffer.d. References Buffer::clear(), Buffer::conduit, Buffer::data, Buffer::eofWrite, Buffer::error(), IConduit::flush(), Buffer::limit, and Buffer::position. Referenced by Buffer::append(), opCall(), and ClusterThread::run(). |
|
Reset 'position' and 'limit' to zero Reimplemented from IBuffer. Reimplemented in MappedBuffer. Definition at line 690 of file Buffer.d. References Buffer::limit, and Buffer::position. Referenced by Cluster::broadcast(), Buffer::fill(), Buffer::flush(), VirtualCache::put(), HttpClient::read(), ClusterThread::run(), and HttpMessage::setConduit(). |
|
Returns the limit of readable content within this buffer Reimplemented from IBuffer. Definition at line 702 of file Buffer.d. References Buffer::limit. |
|
Returns the total capacity of this buffer Reimplemented from IBuffer. Definition at line 713 of file Buffer.d. References Buffer::capacity. |
|
Returns the current read-position within this buffer Reimplemented from IBuffer. Definition at line 724 of file Buffer.d. References Buffer::position. Referenced by Cluster::broadcast(), and ResponseLine::parse(). |
|
Returns the conduit associated with this buffer. Returns null if the buffer is purely memory based; that is, it's not backed by some external medium. Buffers do not require an external conduit to operate, but it can be convenient to associate one. For example, methods fill() & drain() use it to import/export content as necessary. Reimplemented from IBuffer. Definition at line 741 of file Buffer.d. References Buffer::conduit. Referenced by HttpMessage::getConduit(), and ClusterThread::run(). |
|
Sets the external conduit associated with this buffer. Buffers do not require an external conduit to operate, but it can be convenient to associate one. For example, methods fill() & drain() use it to import/export content as necessary. Reimplemented from IBuffer. Reimplemented in MappedBuffer. Definition at line 756 of file Buffer.d. Referenced by HttpMessage::setConduit(), this(), Console::Input::this(), ClusterThread::this(), and Buffer::this(). |
|
Reimplemented from Buffer. Definition at line 109 of file Copy of Console.d. |
|
Definition at line 207 of file Buffer.d. Referenced by Buffer::compress(), Buffer::copy(), Buffer::flush(), Buffer::get(), Buffer::getContent(), Buffer::read(), Buffer::this(), Buffer::toString(), and Buffer::write(). |
|
Definition at line 208 of file Buffer.d. Referenced by Buffer::getStyle(). |
|
Definition at line 209 of file Buffer.d. Referenced by Buffer::clear(), Buffer::compress(), Buffer::copy(), Buffer::flush(), Buffer::getLimit(), Buffer::read(), Buffer::readable(), Buffer::toString(), Buffer::writable(), and Buffer::write(). |
|
Definition at line 210 of file Buffer.d. Referenced by Buffer::append(), Buffer::get(), Buffer::getCapacity(), Buffer::this(), Buffer::writable(), and Buffer::write(). |
|
Definition at line 211 of file Buffer.d. Referenced by Buffer::clear(), Buffer::compress(), Buffer::flush(), Buffer::get(), Buffer::getPosition(), Buffer::read(), Buffer::readable(), Buffer::skip(), and Buffer::toString(). |
|
|
|
|
|
|