The piping Reference Manual

Table of Contents

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

The piping Reference Manual

This is the piping Reference Manual, version 2.0.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:25:14 2018 GMT+0.


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

1 Introduction

piping

A Common Lisp library to enable simple message pipelines.

See about.html for documentation, examples and package index.


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 piping

Author

Nicolas Hafner <shinmera@tymoon.eu>

License

Artistic

Description

A library to enable simple message pipelines.

Version

2.0.0

Source

piping.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 piping.asd

Location

piping.asd

Systems

piping (system)


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

3.1.2 piping/package.lisp

Parent

piping (system)

Location

package.lisp

Packages

piping


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

3.1.3 piping/array.lisp

Dependency

package.lisp (file)

Parent

piping (system)

Location

array.lisp

Internal Definitions

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

3.1.4 piping/pipe.lisp

Dependency

array.lisp (file)

Parent

piping (system)

Location

pipe.lisp

Exported Definitions

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

3.1.5 piping/pipeline.lisp

Dependency

pipe.lisp (file)

Parent

piping (system)

Location

pipeline.lisp

Exported Definitions

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

3.1.6 piping/extra.lisp

Dependency

pipeline.lisp (file)

Parent

piping (system)

Location

extra.lisp

Exported Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 piping

Source

package.lisp (file)

Nicknames
Use List

common-lisp

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

Creates a new splitter array.

Package

piping

Source

pipeline.lisp (file)


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

5.1.2 Generic functions

Generic Function: add-segment PIPELINE SEGMENT &optional PLACE

Add a new segment to the pipeline.
If place is set, the pipe is added to the specified place as per INSERT. The place specified is expected to be a splitter or similar to append the pipe to. Returns the segment.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: add-segment (PIPELINE pipeline) (SEGMENT segment) &optional PLACE
Method: add-segment (PIPELINE pipeline) (ARRAY array) &optional PLACE
Method: add-segment (PIPELINE pipeline) (ARRAY (eql pipe)) &optional PLACE
Generic Function: find-parent SEGMENT PLACE

Same as FIND-PLACE, except it returns the parent of the matched item.
As secondary value it returns the position of the matched item within the parent.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: find-parent (SWITCH switch) PLACE
Source

extra.lisp (file)

Method: find-parent (SEGMENT segment) PLACE
Method: find-parent (ARRAY array) (PLACE list)
Method: find-parent (PIPELINE pipeline) (PLACE list)
Method: find-parent (PIPELINE pipeline) (NAME symbol)
Generic Function: find-place SEGMENT PLACE

Searches and returns the segment as designated by PLACE.
A place is a list of signed integers, each denoting the position of the item within the current splitter or segment. Subsequent numbers descend into the item matched by the previous number.

As such, (1 4) matches the following:
([] () [] [])
- ([] [] [] [] [] [])
^^

Package

piping

Source

pipeline.lisp (file)

Methods
Method: find-place (SWITCH switch) PLACE
Source

extra.lisp (file)

Method: find-place (SEGMENT segment) PLACE
Method: find-place (ARRAY array) (PLACE list)
Method: find-place (PIPELINE pipeline) (PLACE list)
Method: find-place (PIPELINE pipeline) (NAME symbol)
Generic Function: insert SEGMENT PLACE &optional POSITION

Appends the item to the given place unless a specific position is given.
If position is set, the item is expected to be inserted at the specified position, without replacing or disturbing any other items.

Returns the segment.

Do note that using insert directly can affect names and make them invalid or point to unexpected segments. You should always use add-segment or insert-segment instead if possible.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: insert ITEM (SWITCH switch) &optional POSITION
Source

extra.lisp (file)

Method: insert SEGMENT (ARRAY array) &optional POSITION
Generic Function: insert-segment PIPELINE SEGMENT PLACE

Insert the segment at the given place.
Note that the segment is always inserted into the parent as specified by the place and found by FIND-PARENT and inserted into the position as per INSERT.

Returns the segment.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: insert-segment (PIPELINE pipeline) (SEGMENT segment) PLACE
Method: insert-segment (PIPELINE pipeline) (ARRAY array) PLACE
Method: insert-segment (PIPELINE pipeline) (ARRAY (eql pipe)) PLACE
Generic Function: move-segment PIPELINE PLACE NEW-PLACE

Moves a segment to another while preserving names.
This attempts to fix names associated with the place or deeper places by changing their place as well.

Returns the segment.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: move-segment (PIPELINE pipeline) PLACE NEW-PLACE
Generic Function: names OBJECT
Generic Function: (setf names) NEW-VALUE OBJECT
Package

piping

Methods
Method: names (PIPELINE pipeline)

automatically generated reader method

Source

pipeline.lisp (file)

Method: (setf names) NEW-VALUE (PIPELINE pipeline)

automatically generated writer method

Source

pipeline.lisp (file)

Generic Function: pass SEGMENT MESSAGE

Pass a message through a segment.

Note for implementors of this method for custom segments: You are expected to return a message object, which will be used for subsequent passing down the current segment. If you return NIL, passing stops. This does not affect passing in segments on other splitters. Do note that changing the object itself directly will of course als be reflected at any other point in the pipeline passing, so muting the passed object should be avoided wherever possible.

Returns the message.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: pass (SWITCH switch) MESSAGE
Source

extra.lisp (file)

Method: pass (PRINTER printer) MESSAGE
Source

extra.lisp (file)

Method: pass (FILTER predicate-filter) MESSAGE
Source

extra.lisp (file)

Method: pass (PIPELINE pipeline) MESSAGE
Method: pass (VECTOR vector) MESSAGE
Method: pass (SEGMENT segment) MESSAGE
Generic Function: pipe OBJECT
Generic Function: (setf pipe) NEW-VALUE OBJECT
Package

piping

Methods
Method: pipe (SWITCH switch)

automatically generated reader method

Source

extra.lisp (file)

Method: (setf pipe) NEW-VALUE (SWITCH switch)

automatically generated writer method

Source

extra.lisp (file)

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

piping

Methods
Method: pipeline (PIPELINE pipeline)

automatically generated reader method

Source

pipeline.lisp (file)

Method: (setf pipeline) NEW-VALUE (PIPELINE pipeline)

automatically generated writer method

Source

pipeline.lisp (file)

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

piping

Methods
Method: predicate (PREDICATE-FILTER predicate-filter)

automatically generated reader method

Source

extra.lisp (file)

Method: (setf predicate) NEW-VALUE (PREDICATE-FILTER predicate-filter)

automatically generated writer method

Source

extra.lisp (file)

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

piping

Methods
Method: print-stream (PRINTER printer)

automatically generated reader method

Source

extra.lisp (file)

Method: (setf print-stream) NEW-VALUE (PRINTER printer)

automatically generated writer method

Source

extra.lisp (file)

Generic Function: remove-segment PIPELINE PLACE

Removes the given segment (as well as its children, if any).
This also removes any names that either match or go through the specified place and adapts names that would be affected by a place shift.

Returns the segment.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: remove-segment (PIPELINE pipeline) PLACE
Generic Function: replace-segment PIPELINE PLACE PIPE

Replace a place with a pipe.
This happens simply through REMOVE-PLACE and INSERT-PIPE.

Note that this will destroy names due to REMOVE-PLACE.

Returns the segment.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: replace-segment (PIPELINE pipeline) PLACE (SEGMENT segment)
Method: replace-segment (PIPELINE pipeline) PLACE (ARRAY array)
Method: replace-segment (PIPELINE pipeline) PLACE (ARRAY (eql pipe))
Generic Function: set-name PIPELINE PLACE NAME

Associates a place with a name so it can be accessed more easily.

Returns the name.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: set-name (PIPELINE pipeline) (PLACE list) (NAME symbol)
Generic Function: value OBJECT
Generic Function: (setf value) NEW-VALUE OBJECT
Package

piping

Methods
Method: value (SWITCH switch)

automatically generated reader method

Source

extra.lisp (file)

Method: (setf value) NEW-VALUE (SWITCH switch)

automatically generated writer method

Source

extra.lisp (file)

Generic Function: withdraw PLACE &optional POSITION

Removes an item from the place, by default from the end unless position is set.
If position is given, it is expected that the specified item is removed without disturbing any other items and without leaving any empty spaces within the parent.

Returns the segment.

Do note that using withdraw directly can affect names and make them invalid or point to unexpected segments. You should always use remove-segment instead if possible.

Package

piping

Source

pipeline.lisp (file)

Methods
Method: withdraw (SWITCH switch) &optional POSITION
Source

extra.lisp (file)

Method: withdraw (ARRAY array) &optional POSITION

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

5.1.3 Classes

Class: faucet ()

Base faucet class.

Package

piping

Source

pipe.lisp (file)

Direct superclasses

segment (class)

Direct subclasses

printer (class)

Direct methods

print-object (method)

Class: filter ()

Base filter class.

Package

piping

Source

pipe.lisp (file)

Direct superclasses

segment (class)

Direct subclasses

predicate-filter (class)

Direct methods

print-object (method)

Class: pipeline ()

Base pipeline object that is necessary to orchestrate piping systems.

Package

piping

Source

pipeline.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: %pipeline
Initargs

:pipeline

Initform

(piping:make-pipe)

Readers

pipeline (generic function)

Writers

(setf pipeline) (generic function)

Slot: %names
Initargs

:names

Initform

(make-hash-table :test (quote equal))

Readers

names (generic function)

Writers

(setf names) (generic function)

Class: predicate-filter ()

Segment that predicate-filters messages according to a predicate function.

Package

piping

Source

extra.lisp (file)

Direct superclasses

filter (class)

Direct methods
Direct slots
Slot: %predicate
Initargs

:predicate

Initform

(error "predicate function required.")

Readers

predicate (generic function)

Writers

(setf predicate) (generic function)

Class: printer ()

Segment that prints each message it receives.

Package

piping

Source

extra.lisp (file)

Direct superclasses

faucet (class)

Direct methods
Direct slots
Slot: %stream
Initargs

:stream

Initform

*standard-output*

Readers

print-stream (generic function)

Writers

(setf print-stream) (generic function)

Class: segment ()

Base segment class.

Package

piping

Source

pipe.lisp (file)

Direct superclasses

standard-object (class)

Direct subclasses
Direct methods
Class: switch ()

A switch that only passes to the pipe as set by its current value.

Package

piping

Source

extra.lisp (file)

Direct superclasses

segment (class)

Direct methods
Direct slots
Slot: %value
Initargs

:value

Initform

0

Readers

value (generic function)

Writers

(setf value) (generic function)

Slot: %pipe
Initargs

:pipe

Initform

(piping:make-pipe)

Readers

pipe (generic function)

Writers

(setf pipe) (generic function)


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

5.2 Internal definitions


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

5.2.1 Functions

Function: array-shift ARRAY &key N FROM TO ADJUST FILL

Helper function that shifts a subset of array elements in either direction for a specified amount. Optionally also extends the array and fills empty space with a given element.

N — The amount to be moved. Can either be positive or negative.
FROM — Move region start point.
TO — Move region end point.
ADJUST — Whether to adjust the fill pointer and the array bounds.
FILL — If provided, empty spaces created by the move will be filled with this element.

Package

piping

Source

array.lisp (file)

Function: vector-pop-position VECTOR POSITION

Pops the element at the given position off the vector and returns it. This is potentially very costly as all elements after the given position need to be shifted back as per ARRAY-SHIFT.

Package

piping

Source

array.lisp (file)

Function: vector-push-extend-position ELEMENT VECTOR POSITION

Pushes the element into the specified position and shifts everything to the right to make space. This is potentially very costly as all elements after the given position need to be shifted as per ARRAY-SHIFT.

Package

piping

Source

array.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   P  
Index Entry  Section

F
File, Lisp, piping.asd: The piping<dot>asd file
File, Lisp, piping/array.lisp: The piping/array<dot>lisp file
File, Lisp, piping/extra.lisp: The piping/extra<dot>lisp file
File, Lisp, piping/package.lisp: The piping/package<dot>lisp file
File, Lisp, piping/pipe.lisp: The piping/pipe<dot>lisp file
File, Lisp, piping/pipeline.lisp: The piping/pipeline<dot>lisp file

L
Lisp File, piping.asd: The piping<dot>asd file
Lisp File, piping/array.lisp: The piping/array<dot>lisp file
Lisp File, piping/extra.lisp: The piping/extra<dot>lisp file
Lisp File, piping/package.lisp: The piping/package<dot>lisp file
Lisp File, piping/pipe.lisp: The piping/pipe<dot>lisp file
Lisp File, piping/pipeline.lisp: The piping/pipeline<dot>lisp file

P
piping.asd: The piping<dot>asd file
piping/array.lisp: The piping/array<dot>lisp file
piping/extra.lisp: The piping/extra<dot>lisp file
piping/package.lisp: The piping/package<dot>lisp file
piping/pipe.lisp: The piping/pipe<dot>lisp file
piping/pipeline.lisp: The piping/pipeline<dot>lisp file

Jump to:   F   L   P  

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

A.2 Functions

Jump to:   (  
A   F   G   I   M   N   P   R   S   V   W  
Index Entry  Section

(
(setf names): Exported generic functions
(setf names): Exported generic functions
(setf pipe): Exported generic functions
(setf pipe): Exported generic functions
(setf pipeline): Exported generic functions
(setf pipeline): Exported generic functions
(setf predicate): Exported generic functions
(setf predicate): Exported generic functions
(setf print-stream): Exported generic functions
(setf print-stream): Exported generic functions
(setf value): Exported generic functions
(setf value): Exported generic functions

A
add-segment: Exported generic functions
add-segment: Exported generic functions
add-segment: Exported generic functions
add-segment: Exported generic functions
array-shift: Internal functions

F
find-parent: Exported generic functions
find-parent: Exported generic functions
find-parent: Exported generic functions
find-parent: Exported generic functions
find-parent: Exported generic functions
find-parent: Exported generic functions
find-place: Exported generic functions
find-place: Exported generic functions
find-place: Exported generic functions
find-place: Exported generic functions
find-place: Exported generic functions
find-place: Exported generic functions
Function, array-shift: Internal functions
Function, make-pipe: Exported functions
Function, vector-pop-position: Internal functions
Function, vector-push-extend-position: Internal functions

G
Generic Function, (setf names): Exported generic functions
Generic Function, (setf pipe): Exported generic functions
Generic Function, (setf pipeline): Exported generic functions
Generic Function, (setf predicate): Exported generic functions
Generic Function, (setf print-stream): Exported generic functions
Generic Function, (setf value): Exported generic functions
Generic Function, add-segment: Exported generic functions
Generic Function, find-parent: Exported generic functions
Generic Function, find-place: Exported generic functions
Generic Function, insert: Exported generic functions
Generic Function, insert-segment: Exported generic functions
Generic Function, move-segment: Exported generic functions
Generic Function, names: Exported generic functions
Generic Function, pass: Exported generic functions
Generic Function, pipe: Exported generic functions
Generic Function, pipeline: Exported generic functions
Generic Function, predicate: Exported generic functions
Generic Function, print-stream: Exported generic functions
Generic Function, remove-segment: Exported generic functions
Generic Function, replace-segment: Exported generic functions
Generic Function, set-name: Exported generic functions
Generic Function, value: Exported generic functions
Generic Function, withdraw: Exported generic functions

I
insert: Exported generic functions
insert: Exported generic functions
insert: Exported generic functions
insert-segment: Exported generic functions
insert-segment: Exported generic functions
insert-segment: Exported generic functions
insert-segment: Exported generic functions

M
make-pipe: Exported functions
Method, (setf names): Exported generic functions
Method, (setf pipe): Exported generic functions
Method, (setf pipeline): Exported generic functions
Method, (setf predicate): Exported generic functions
Method, (setf print-stream): Exported generic functions
Method, (setf value): Exported generic functions
Method, add-segment: Exported generic functions
Method, add-segment: Exported generic functions
Method, add-segment: Exported generic functions
Method, find-parent: Exported generic functions
Method, find-parent: Exported generic functions
Method, find-parent: Exported generic functions
Method, find-parent: Exported generic functions
Method, find-parent: Exported generic functions
Method, find-place: Exported generic functions
Method, find-place: Exported generic functions
Method, find-place: Exported generic functions
Method, find-place: Exported generic functions
Method, find-place: Exported generic functions
Method, insert: Exported generic functions
Method, insert: Exported generic functions
Method, insert-segment: Exported generic functions
Method, insert-segment: Exported generic functions
Method, insert-segment: Exported generic functions
Method, move-segment: Exported generic functions
Method, names: Exported generic functions
Method, pass: Exported generic functions
Method, pass: Exported generic functions
Method, pass: Exported generic functions
Method, pass: Exported generic functions
Method, pass: Exported generic functions
Method, pass: Exported generic functions
Method, pipe: Exported generic functions
Method, pipeline: Exported generic functions
Method, predicate: Exported generic functions
Method, print-stream: Exported generic functions
Method, remove-segment: Exported generic functions
Method, replace-segment: Exported generic functions
Method, replace-segment: Exported generic functions
Method, replace-segment: Exported generic functions
Method, set-name: Exported generic functions
Method, value: Exported generic functions
Method, withdraw: Exported generic functions
Method, withdraw: Exported generic functions
move-segment: Exported generic functions
move-segment: Exported generic functions

N
names: Exported generic functions
names: Exported generic functions

P
pass: Exported generic functions
pass: Exported generic functions
pass: Exported generic functions
pass: Exported generic functions
pass: Exported generic functions
pass: Exported generic functions
pass: Exported generic functions
pipe: Exported generic functions
pipe: Exported generic functions
pipeline: Exported generic functions
pipeline: Exported generic functions
predicate: Exported generic functions
predicate: Exported generic functions
print-stream: Exported generic functions
print-stream: Exported generic functions

R
remove-segment: Exported generic functions
remove-segment: Exported generic functions
replace-segment: Exported generic functions
replace-segment: Exported generic functions
replace-segment: Exported generic functions
replace-segment: Exported generic functions

S
set-name: Exported generic functions
set-name: Exported generic functions

V
value: Exported generic functions
value: Exported generic functions
vector-pop-position: Internal functions
vector-push-extend-position: Internal functions

W
withdraw: Exported generic functions
withdraw: Exported generic functions
withdraw: Exported generic functions

Jump to:   (  
A   F   G   I   M   N   P   R   S   V   W  

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

A.3 Variables

Jump to:   %  
S  
Index Entry  Section

%
%names: Exported classes
%pipe: Exported classes
%pipeline: Exported classes
%predicate: Exported classes
%stream: Exported classes
%value: Exported classes

S
Slot, %names: Exported classes
Slot, %pipe: Exported classes
Slot, %pipeline: Exported classes
Slot, %predicate: Exported classes
Slot, %stream: Exported classes
Slot, %value: Exported classes

Jump to:   %  
S  

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

A.4 Data types

Jump to:   C   F   P   S  
Index Entry  Section

C
Class, faucet: Exported classes
Class, filter: Exported classes
Class, pipeline: Exported classes
Class, predicate-filter: Exported classes
Class, printer: Exported classes
Class, segment: Exported classes
Class, switch: Exported classes

F
faucet: Exported classes
filter: Exported classes

P
Package, piping: The piping package
pipeline: Exported classes
piping: The piping system
piping: The piping package
predicate-filter: Exported classes
printer: Exported classes

S
segment: Exported classes
switch: Exported classes
System, piping: The piping system

Jump to:   C   F   P   S