The structy-defclass Reference Manual

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

The structy-defclass Reference Manual

This is the structy-defclass Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:55:45 2022 GMT+0.

Table of Contents


1 Introduction

Structy-Defclass

I just want to make a class as easily as I can with structs

     (deftclass name a b c)

expands to

     (defclass name nil
       ((a :initarg :a :reader name-a :type t)
        (b :initarg :b :reader name-b :type t)
        (c :initarg :c :reader name-c :type t)))

     (defun make-name (&key (a () #:a2071) (b () #:b2072) (c () #:c2073))
       (make-instance 'name :a
                      (if #:a2071
                          a
                          nil)
                      :b
                      (if #:b2072
                          b
                          nil)
                      :c
                      (if #:c2073
                          c
                          nil)))

     (defun name-p (x) (typep x 'name))

The following are also supported

	 (deftclass (thing (:include x)
					   (:conc some-)
					   (:constructor gimme-thing))
	   a
	   (b 0)
	   (c 0 :type fixnum))

This also means it's easier to refactor into structs once you have done with experimenting.


2 Systems

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


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

2.1 structy-defclass

Provides deftclass, a struct-like way of defining classes

Author

Chris Bagley <chris.bagley@gmail.com>

License

BSD 2 Clause

Source

structy-defclass.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 structy-defclass/structy-defclass.asd

Source

structy-defclass.asd.

Parent Component

structy-defclass (system).

ASDF Systems

structy-defclass.


3.1.2 structy-defclass/package.lisp

Source

structy-defclass.asd.

Parent Component

structy-defclass (system).

Packages

structy-defclass.


3.1.3 structy-defclass/structy-defclass.lisp

Dependency

package.lisp (file).

Source

structy-defclass.asd.

Parent Component

structy-defclass (system).

Public Interface

deftclass (macro).


4 Packages

Packages are listed by definition order.


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

4.1 structy-defclass

Source

package.lisp.

Use List

common-lisp.

Public Interface

deftclass (macro).


5 Definitions

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


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

5.1 Public Interface


5.1.1 Macros

Macro: deftclass (name &body slots)
Package

structy-defclass.

Source

structy-defclass.lisp.


Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   D   M  
Index Entry  Section

D
deftclass: Public macros

M
Macro, deftclass: Public macros

Jump to:   D   M  

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

A.3 Variables