The template Reference Manual

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

The template Reference Manual

This is the template Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Nov 15 07:22:24 2022 GMT+0.

Table of Contents


1 Introduction

                               TEMPLATE
                               ========

                           By Robert Smith

TEMPLATE is a package for templates and template functions, similar to
C++ templates.

Example:

;;; Define the templated function.
(define-templated-function add (type) (x y)
  `(locally (declare (type ,type x y))
     (the ,type (+ x y))))

;;; Instantiate it with a few types.
(instantiate-templated-function add fixnum)
(instantiate-templated-function add single-float)

;;; Call it.
(add '(fixnum) 1 2)
(add '(single-float) 1.0 2.0)


2 Systems

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


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

2.1 template

A library for templates and template functions.

Author

Robert Smith <quad@symbo1ics.com>

License

BSD 3-clause (See LICENSE)

Dependencies
  • parameterized-function (system).
  • alexandria (system).
Source

template.asd.

Child Components

3 Files

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


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

3.1 Lisp


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

3.1.1 template/template.asd

Source

template.asd.

Parent Component

template (system).

ASDF Systems

template.


3.1.2 template/package.lisp

Dependency

license (file).

Source

template.asd.

Parent Component

template (system).

Packages

template.


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

3.1.3 template/templates.lisp

Dependency

package.lisp (file).

Source

template.asd.

Parent Component

template (system).

Public Interface
Internals

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

3.2 Static


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

3.2.1 template/LICENSE

Source

template.asd.

Parent Component

template (system).


4 Packages

Packages are listed by definition order.


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

4.1 template

Source

package.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-template (name params &body body)
Package

template.

Source

templates.lisp.

Macro: define-templated-function (name (&rest template-args) (&rest lambda-list) &body body)
Package

template.

Source

templates.lisp.

Macro: instantiate-template (name &rest args)
Package

template.

Source

templates.lisp.

Macro: instantiate-templated-function (name &rest template-values)
Package

template.

Source

templates.lisp.

Macro: template ((&rest params) &body body)
Package

template.

Source

templates.lisp.


Next: , Previous: , Up: Public Interface   [Contents][Index]

5.1.2 Ordinary functions

Function: expand-template (name &rest args)
Package

template.

Source

templates.lisp.


5.1.3 Structures

Structure: template
Package

template.

Source

templates.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: name
Readers

template-name.

Writers

(setf template-name).

Slot: arity
Readers

template-arity.

Writers

(setf template-arity).

Slot: code-generator
Readers

template-code-generator.

Writers

(setf template-code-generator).

Slot: function-arguments
Readers

template-function-arguments.

Writers

(setf template-function-arguments).


5.2 Internals


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

5.2.1 Special variables

Special Variable: *templates*
Package

template.

Source

templates.lisp.


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

5.2.2 Ordinary functions

Function: copy-template (instance)
Package

template.

Source

templates.lisp.

Function: ensure-kw-list (x &optional first-elt)
Package

template.

Source

templates.lisp.

Function: keywordify (x)
Package

template.

Source

templates.lisp.

Function: make-template (&key name arity code-generator function-arguments)
Package

template.

Source

templates.lisp.

Function: mangle (name &rest arguments)
Package

template.

Source

templates.lisp.

Reader: template-arity (instance)
Writer: (setf template-arity) (instance)
Package

template.

Source

templates.lisp.

Target Slot

arity.

Reader: template-code-generator (instance)
Writer: (setf template-code-generator) (instance)
Package

template.

Source

templates.lisp.

Target Slot

code-generator.

Reader: template-function-arguments (instance)
Writer: (setf template-function-arguments) (instance)
Package

template.

Source

templates.lisp.

Target Slot

function-arguments.

Reader: template-name (instance)
Writer: (setf template-name) (instance)
Package

template.

Source

templates.lisp.

Target Slot

name.

Function: template-p (object)
Package

template.

Source

templates.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   (  
C   D   E   F   I   K   M   T  
Index Entry  Section

(
(setf template-arity): Private ordinary functions
(setf template-code-generator): Private ordinary functions
(setf template-function-arguments): Private ordinary functions
(setf template-name): Private ordinary functions

C
copy-template: Private ordinary functions

D
define-template: Public macros
define-templated-function: Public macros

E
ensure-kw-list: Private ordinary functions
expand-template: Public ordinary functions

F
Function, (setf template-arity): Private ordinary functions
Function, (setf template-code-generator): Private ordinary functions
Function, (setf template-function-arguments): Private ordinary functions
Function, (setf template-name): Private ordinary functions
Function, copy-template: Private ordinary functions
Function, ensure-kw-list: Private ordinary functions
Function, expand-template: Public ordinary functions
Function, keywordify: Private ordinary functions
Function, make-template: Private ordinary functions
Function, mangle: Private ordinary functions
Function, template-arity: Private ordinary functions
Function, template-code-generator: Private ordinary functions
Function, template-function-arguments: Private ordinary functions
Function, template-name: Private ordinary functions
Function, template-p: Private ordinary functions

I
instantiate-template: Public macros
instantiate-templated-function: Public macros

K
keywordify: Private ordinary functions

M
Macro, define-template: Public macros
Macro, define-templated-function: Public macros
Macro, instantiate-template: Public macros
Macro, instantiate-templated-function: Public macros
Macro, template: Public macros
make-template: Private ordinary functions
mangle: Private ordinary functions

T
template: Public macros
template-arity: Private ordinary functions
template-code-generator: Private ordinary functions
template-function-arguments: Private ordinary functions
template-name: Private ordinary functions
template-p: Private ordinary functions

Jump to:   (  
C   D   E   F   I   K   M   T