The factory-alien Reference Manual

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

The factory-alien Reference Manual

This is the factory-alien Reference Manual, version 0.0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Sep 15 04:42:50 2022 GMT+0.

Table of Contents


1 Introduction

.. image:: https://travis-ci.org/fisxoj/factory-alien.svg?branch=master
   :target: https://travis-ci.org/fisxoj/factory-alien
   :alt: Travis CI status badge
.. image:: https://coveralls.io/repos/github/fisxoj/factory-alien/badge.svg?branch=master
   :target: https://coveralls.io/github/fisxoj/factory-alien?branch=master
   :alt: Coveralls status badge
.. image:: https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg
   :alt: Contributor Covenant
   :target: CODE_OF_CONDUCT.md


:Source: `https://github.com/fisxoj/factory-alien `_
:Docs:  `https://fisxoj.github.io/factory-alien/ `_

factory-alien is a common lisp library that's probably awesome.

-------
Example
-------


2 Systems

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


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

2.1 factory-alien

Factory alien is a library for generating fixture data for testing applications.

Author

Matt Novenstern <fisxoj@gmail.com>

Home Page

https://fisxoj.github.io/factory-alien/

License

MIT

Long Description

.. image:: https://travis-ci.org/fisxoj/factory-alien.svg?branch=master
:target: https://travis-ci.org/fisxoj/factory-alien
:alt: Travis CI status badge
.. image:: https://coveralls.io/repos/github/fisxoj/factory-alien/badge.svg?branch=master :target: https://coveralls.io/github/fisxoj/factory-alien?branch=master
:alt: Coveralls status badge
.. image:: https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg :alt: Contributor Covenant
:target: CODE_OF_CONDUCT.md

:Source: ‘https://github.com/fisxoj/factory-alien <https://github.com/fisxoj/factory-alien>‘_ :Docs: ‘https://fisxoj.github.io/factory-alien/ <https://fisxoj.github.io/factory-alien/>‘_

factory-alien is a common lisp library that’s probably awesome.

——-
Example
——-

Version

0.0.3

Dependencies
  • alexandria (system).
  • closer-mop (system).
Source

factory-alien.asd.

Child Components

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   [Contents][Index]

3.1.1 factory-alien/factory-alien.asd

Source

factory-alien.asd.

Parent Component

factory-alien (system).

ASDF Systems

factory-alien.


3.1.2 factory-alien/sequences.lisp

Source

factory-alien.asd.

Parent Component

factory-alien (system).

Packages

factory-alien.sequences.

Public Interface
Internals

3.1.3 factory-alien/traits.lisp

Source

factory-alien.asd.

Parent Component

factory-alien (system).

Packages

factory-alien.traits.

Public Interface
Internals

3.1.4 factory-alien/factories.lisp

Source

factory-alien.asd.

Parent Component

factory-alien (system).

Packages

factory-alien.factories.

Public Interface
Internals

3.1.5 factory-alien/factory-alien.lisp

Source

factory-alien.asd.

Parent Component

factory-alien (system).

Packages

factory-alien.


4 Packages

Packages are listed by definition order.


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

4.1 factory-alien.sequences

Source

sequences.lisp.

Use List

common-lisp.

Public Interface
Internals

4.2 factory-alien

Source

factory-alien.lisp.

Use List

common-lisp.


4.3 factory-alien.traits

Source

traits.lisp.

Use List

common-lisp.

Public Interface
Internals

4.4 factory-alien.factories

Source

factories.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Macros

Macro: define-sequence (name-and-options lambda-list &body body)
Package

factory-alien.sequences.

Source

sequences.lisp.


5.1.2 Ordinary functions

Function: call-sequence (name)
Package

factory-alien.sequences.

Source

sequences.lisp.

Function: collect-slot-values (trait-definitions traits initargs)
Package

factory-alien.traits.

Source

traits.lisp.

Function: find-factory (name-or-class &optional errorp)

Takes a symbol or class and, if a symbol is given, calls :function:‘find-class‘ on it.

Package

factory-alien.factories.

Source

factories.lisp.

Function: make-anonymous-sequence (funcallable &key initial-value)

Takes a function of one argument and returns the name of the sequence that calls that function.

Package

factory-alien.sequences.

Source

sequences.lisp.

Function: process-trait-definitions (traits)

Creates an alist of (trait-name . slot-initializer-alist), where slot-initializer-alist contains an alist mapping slot name keyword to a function that provides the value for that slot.

Package

factory-alien.traits.

Source

traits.lisp.

Function: reset-sequence (name)
Package

factory-alien.sequences.

Source

sequences.lisp.

Function: reset-sequences ()
Package

factory-alien.sequences.

Source

sequences.lisp.

Function: slot-value (object name)
Package

factory-alien.factories.

Source

factories.lisp.

Function: (setf slot-value) (object name)
Package

factory-alien.factories.

Source

factories.lisp.


5.1.3 Generic functions

Generic Function: build-many (factory n traits &rest initargs)
Package

factory-alien.factories.

Source

factories.lisp.

Methods
Method: build-many (factory n traits &rest initargs)

5.2 Internals


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

5.2.1 Special variables

Special Variable: *anonymous-sequence-counter*

Like :variable:‘*gensym-counter*‘, gets used to generate unique names for anonymous sequences.

Package

factory-alien.sequences.

Source

sequences.lisp.

Special Variable: *factories*

A map of factory names (as keywords) to instances of :class:‘factory‘.

Package

factory-alien.factories.

Source

factories.lisp.

Special Variable: *sequence-state*

The counters for every sequence as a mapping of symbol to an instance of :class:‘sequence‘. Named sequences are stored as their keyword symbol, anonymous sequences are given a numbered name by :function:‘make-anonymous-sequence‘.

Package

factory-alien.sequences.

Source

sequences.lisp.


5.2.2 Macros

Macro: define-factory (name parent-factories &body body-and-options)
Package

factory-alien.factories.

Source

factories.lisp.


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

5.2.3 Ordinary functions

Function: copy-sequence (instance)
Package

factory-alien.sequences.

Source

sequences.lisp.

Function: get-default-trait (factory)
Package

factory-alien.factories.

Source

factories.lisp.

Function: id-field-p (name)
Package

factory-alien.factories.

Source

factories.lisp.

Function: make-sequence (&key value initial-value funcallable)
Package

factory-alien.sequences.

Source

sequences.lisp.

Function: merge-traits (a b)

If a field exists in b, it takes precedence over the field in a, but all fields in a OR b should end up in the final alist. Modifies b in-place for PERFORMANCE.

Package

factory-alien.traits.

Source

traits.lisp.

Function: resolve-traits (trait-definition)

Given an alist of (slot-name . slot-initializer), call :function:‘initialize-slot‘ on each and return a new alist of (name . value).

Package

factory-alien.traits.

Source

traits.lisp.

Reader: sequence-funcallable (instance)
Writer: (setf sequence-funcallable) (instance)
Package

factory-alien.sequences.

Source

sequences.lisp.

Target Slot

funcallable.

Reader: sequence-initial-value (instance)
Writer: (setf sequence-initial-value) (instance)
Package

factory-alien.sequences.

Source

sequences.lisp.

Target Slot

initial-value.

Function: sequence-p (object)
Package

factory-alien.sequences.

Source

sequences.lisp.

Reader: sequence-value (instance)
Writer: (setf sequence-value) (instance)
Package

factory-alien.sequences.

Source

sequences.lisp.

Target Slot

value.


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

5.2.4 Generic functions

Generic Function: build (factory traits &rest initargs)
Package

factory-alien.factories.

Source

factories.lisp.

Methods
Method: build (factory traits &rest initargs)
Generic Function: initialize-slot (type body &rest options)
Package

factory-alien.traits.

Source

traits.lisp.

Methods
Method: initialize-slot ((type (eql :sequence)) (sequence-name symbol) &rest options)
Method: initialize-slot ((type (eql :initform)) value &rest options)
Method: initialize-slot ((type (eql :factory)) factory &rest options)
Generic Reader: instantiable-class (object)
Package

factory-alien.factories.

Methods
Reader Method: instantiable-class ((factory factory))

The class to make an instance of.

Source

factories.lisp.

Target Slot

instantiable-class.

Generic Function: make-trait-initializer (type body &rest options)
Package

factory-alien.traits.

Source

traits.lisp.

Methods
Method: make-trait-initializer (type body &rest options)
Method: make-trait-initializer ((type (eql :sequence)) body &rest options)
Generic Reader: parent-factories (object)
Package

factory-alien.factories.

Methods
Reader Method: parent-factories ((factory factory))

List of parent factories that should be run and merged into instances of this one.

Source

factories.lisp.

Target Slot

parent-factories.

Generic Reader: traits (object)
Package

factory-alien.factories.

Methods
Reader Method: traits ((factory factory))

Mapping of traits

Source

factories.lisp.

Target Slot

traits.


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

5.2.5 Conditions

Condition: no-such-factory
Package

factory-alien.factories.

Source

factories.lisp.

Direct superclasses

condition.

Direct slots
Slot: factory-name
Initargs

:factory-name


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

5.2.6 Structures

Structure: sequence
Package

factory-alien.sequences.

Source

sequences.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: value
Type

integer

Initform

0

Readers

sequence-value.

Writers

(setf sequence-value).

Slot: initial-value
Type

integer

Initform

0

Readers

sequence-initial-value.

Writers

(setf sequence-initial-value).

Slot: funcallable
Type

(or symbol function)

Initform

(quote identity)

Readers

sequence-funcallable.

Writers

(setf sequence-funcallable).


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

5.2.7 Classes

Class: factory

A factory that holds things like the traits defined for the factory, the classes factories it’s related to, and the class to build.

Package

factory-alien.factories.

Source

factories.lisp.

Direct methods
Direct slots
Slot: traits

Mapping of traits

Initargs

:traits

Readers

traits.

Writers

This slot is read-only.

Slot: parent-factories

List of parent factories that should be run and merged into instances of this one.

Initargs

:parent-factories

Readers

parent-factories.

Writers

This slot is read-only.

Slot: instantiable-class

The class to make an instance of.

Initargs

:instantiable-class

Readers

instantiable-class.

Writers

This slot is read-only.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   (  
B   C   D   F   G   I   M   P   R   S   T  
Index Entry  Section

(
(setf sequence-funcallable): Private ordinary functions
(setf sequence-initial-value): Private ordinary functions
(setf sequence-value): Private ordinary functions
(setf slot-value): Public ordinary functions

B
build: Private generic functions
build: Private generic functions
build-many: Public generic functions
build-many: Public generic functions

C
call-sequence: Public ordinary functions
collect-slot-values: Public ordinary functions
copy-sequence: Private ordinary functions

D
define-factory: Private macros
define-sequence: Public macros

F
find-factory: Public ordinary functions
Function, (setf sequence-funcallable): Private ordinary functions
Function, (setf sequence-initial-value): Private ordinary functions
Function, (setf sequence-value): Private ordinary functions
Function, (setf slot-value): Public ordinary functions
Function, call-sequence: Public ordinary functions
Function, collect-slot-values: Public ordinary functions
Function, copy-sequence: Private ordinary functions
Function, find-factory: Public ordinary functions
Function, get-default-trait: Private ordinary functions
Function, id-field-p: Private ordinary functions
Function, make-anonymous-sequence: Public ordinary functions
Function, make-sequence: Private ordinary functions
Function, merge-traits: Private ordinary functions
Function, process-trait-definitions: Public ordinary functions
Function, reset-sequence: Public ordinary functions
Function, reset-sequences: Public ordinary functions
Function, resolve-traits: Private ordinary functions
Function, sequence-funcallable: Private ordinary functions
Function, sequence-initial-value: Private ordinary functions
Function, sequence-p: Private ordinary functions
Function, sequence-value: Private ordinary functions
Function, slot-value: Public ordinary functions

G
Generic Function, build: Private generic functions
Generic Function, build-many: Public generic functions
Generic Function, initialize-slot: Private generic functions
Generic Function, instantiable-class: Private generic functions
Generic Function, make-trait-initializer: Private generic functions
Generic Function, parent-factories: Private generic functions
Generic Function, traits: Private generic functions
get-default-trait: Private ordinary functions

I
id-field-p: Private ordinary functions
initialize-slot: Private generic functions
initialize-slot: Private generic functions
initialize-slot: Private generic functions
initialize-slot: Private generic functions
instantiable-class: Private generic functions
instantiable-class: Private generic functions

M
Macro, define-factory: Private macros
Macro, define-sequence: Public macros
make-anonymous-sequence: Public ordinary functions
make-sequence: Private ordinary functions
make-trait-initializer: Private generic functions
make-trait-initializer: Private generic functions
make-trait-initializer: Private generic functions
merge-traits: Private ordinary functions
Method, build: Private generic functions
Method, build-many: Public generic functions
Method, initialize-slot: Private generic functions
Method, initialize-slot: Private generic functions
Method, initialize-slot: Private generic functions
Method, instantiable-class: Private generic functions
Method, make-trait-initializer: Private generic functions
Method, make-trait-initializer: Private generic functions
Method, parent-factories: Private generic functions
Method, traits: Private generic functions

P
parent-factories: Private generic functions
parent-factories: Private generic functions
process-trait-definitions: Public ordinary functions

R
reset-sequence: Public ordinary functions
reset-sequences: Public ordinary functions
resolve-traits: Private ordinary functions

S
sequence-funcallable: Private ordinary functions
sequence-initial-value: Private ordinary functions
sequence-p: Private ordinary functions
sequence-value: Private ordinary functions
slot-value: Public ordinary functions

T
traits: Private generic functions
traits: Private generic functions

Jump to:   (  
B   C   D   F   G   I   M   P   R   S   T  

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

A.4 Data types

Jump to:   C   F   N   P   S   T  
Index Entry  Section

C
Class, factory: Private classes
Condition, no-such-factory: Private conditions

F
factories.lisp: The factory-alien/factories․lisp file
factory: Private classes
factory-alien: The factory-alien system
factory-alien: The factory-alien package
factory-alien.asd: The factory-alien/factory-alien․asd file
factory-alien.factories: The factory-alien․factories package
factory-alien.lisp: The factory-alien/factory-alien․lisp file
factory-alien.sequences: The factory-alien․sequences package
factory-alien.traits: The factory-alien․traits package
File, factories.lisp: The factory-alien/factories․lisp file
File, factory-alien.asd: The factory-alien/factory-alien․asd file
File, factory-alien.lisp: The factory-alien/factory-alien․lisp file
File, sequences.lisp: The factory-alien/sequences․lisp file
File, traits.lisp: The factory-alien/traits․lisp file

N
no-such-factory: Private conditions

P
Package, factory-alien: The factory-alien package
Package, factory-alien.factories: The factory-alien․factories package
Package, factory-alien.sequences: The factory-alien․sequences package
Package, factory-alien.traits: The factory-alien․traits package

S
sequence: Private structures
sequences.lisp: The factory-alien/sequences․lisp file
Structure, sequence: Private structures
System, factory-alien: The factory-alien system

T
traits.lisp: The factory-alien/traits․lisp file

Jump to:   C   F   N   P   S   T