The redirect-stream Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The redirect-stream Reference Manual

This is the redirect-stream Reference Manual, version 1.0.0, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:30:46 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

About Redirect-Stream

This is a very simple implementation of a gray stream that redirects all stream operations it receives to another stream. This is useful in situations where you would like to change the target of operations at any point in time without being able to change the actual binding of the stream that is being operated on.

How To

Load it with Quicklisp or ASDF

(ql:quickload :redirect-stream)

Let's create a redirect stream.

(defvar *stream* (redirect-stream:make-redirect-stream))

At this point there's no stream inside the redirect-stream, so doing anything won't result in anything useful.

(print 0 *stream*)

So let's change that.

(setf (redirect-stream:stream *stream*) *standard-output*)
(print 0 *stream*)

We can also use it for input.

(setf (redirect-stream:stream *stream*) *standard-input*)
(read-line *stream*)

And that's pretty much it, really. It just redirects everything, just as one might guess.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 redirect-stream

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/redirect-stream

License

Artistic

Description

Offers a stream that redirects all actions to an inner stream.

Version

1.0.0

Dependency

trivial-gray-streams

Source

redirect-stream.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 redirect-stream.asd

Location

redirect-stream.asd

Systems

redirect-stream (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 redirect-stream/redirect-stream.lisp

Parent

redirect-stream (system)

Location

redirect-stream.lisp

Packages

redirect-stream

Exported Definitions
Internal Definitions

define-redirect-method (macro)


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 redirect-stream/documentation.lisp

Dependency

redirect-stream.lisp (file)

Parent

redirect-stream (system)

Location

documentation.lisp

Internal Definitions

setdocs (macro)


Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 redirect-stream

Source

redirect-stream.lisp (file)

Nickname

org.shirakumo.redirect-stream

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: make-redirect-stream &optional STREAM

Creates a new REDIRECT-STREAM that directs all operations to STREAM.

See STREAM
See REDIRECT-STREAM

Package

redirect-stream

Source

redirect-stream.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: stream OBJECT

Returns the stream the REDIRECT-STREAM redirects to.

SETF-able.

See REDIRECT-STREAM

Package

redirect-stream

Writer

(setf stream) (generic function)

Methods
Method: stream (REDIRECT-STREAM redirect-stream)

automatically generated reader method

Source

redirect-stream.lisp (file)

Generic Function: (setf stream) NEW-VALUE OBJECT
Package

redirect-stream

Reader

stream (generic function)

Methods
Method: (setf stream) NEW-VALUE (REDIRECT-STREAM redirect-stream)

automatically generated writer method

Source

redirect-stream.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Classes

Class: redirect-stream ()

A gray-stream class that redirects all stream operations to its STREAM object.

If STREAM is NIL, a stream operation will do nothing and return NIL. Otherwise the exact same operation with the exact same parameters is performed on STREAM.

See STREAM

Package

redirect-stream

Source

redirect-stream.lisp (file)

Direct superclasses
  • fundamental-binary-input-stream (class)
  • fundamental-binary-output-stream (class)
  • fundamental-character-input-stream (class)
  • fundamental-character-output-stream (class)
Direct methods
  • stream-file-position (method)
  • stream-write-sequence (method)
  • stream-read-sequence (method)
  • stream-write-byte (method)
  • stream-read-byte (method)
  • stream-advance-to-column (method)
  • stream-clear-output (method)
  • stream-force-output (method)
  • stream-finish-output (method)
  • stream-fresh-line (method)
  • stream-terpri (method)
  • stream-write-string (method)
  • stream-start-line-p (method)
  • stream-line-column (method)
  • stream-write-char (method)
  • stream-clear-input (method)
  • stream-read-line (method)
  • stream-listen (method)
  • stream-peek-char (method)
  • stream-read-char-no-hang (method)
  • stream-unread-char (method)
  • stream-read-char (method)
  • stream (method)
  • stream (method)
Direct slots
Slot: stream
Initargs

:stream

Readers

stream (generic function)

Writers

(setf stream) (generic function)

Direct Default Initargs
InitargValue
:streamnil

Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: define-redirect-method NAME ARGS
Package

redirect-stream

Source

redirect-stream.lisp (file)

Macro: setdocs &body PAIRS
Package

redirect-stream

Source

documentation.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   R  
Index Entry  Section

F
File, Lisp, redirect-stream.asd: The redirect-stream<dot>asd file
File, Lisp, redirect-stream/documentation.lisp: The redirect-stream/documentation<dot>lisp file
File, Lisp, redirect-stream/redirect-stream.lisp: The redirect-stream/redirect-stream<dot>lisp file

L
Lisp File, redirect-stream.asd: The redirect-stream<dot>asd file
Lisp File, redirect-stream/documentation.lisp: The redirect-stream/documentation<dot>lisp file
Lisp File, redirect-stream/redirect-stream.lisp: The redirect-stream/redirect-stream<dot>lisp file

R
redirect-stream.asd: The redirect-stream<dot>asd file
redirect-stream/documentation.lisp: The redirect-stream/documentation<dot>lisp file
redirect-stream/redirect-stream.lisp: The redirect-stream/redirect-stream<dot>lisp file

Jump to:   F   L   R  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
D   F   G   M   S  
Index Entry  Section

(
(setf stream): Exported generic functions
(setf stream): Exported generic functions

D
define-redirect-method: Internal macros

F
Function, make-redirect-stream: Exported functions

G
Generic Function, (setf stream): Exported generic functions
Generic Function, stream: Exported generic functions

M
Macro, define-redirect-method: Internal macros
Macro, setdocs: Internal macros
make-redirect-stream: Exported functions
Method, (setf stream): Exported generic functions
Method, stream: Exported generic functions

S
setdocs: Internal macros
stream: Exported generic functions
stream: Exported generic functions

Jump to:   (  
D   F   G   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   S  
Index Entry  Section

S
Slot, stream: Exported classes
stream: Exported classes

Jump to:   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   R   S  
Index Entry  Section

C
Class, redirect-stream: Exported classes

P
Package, redirect-stream: The redirect-stream package

R
redirect-stream: The redirect-stream system
redirect-stream: The redirect-stream package
redirect-stream: Exported classes

S
System, redirect-stream: The redirect-stream system

Jump to:   C   P   R   S