The eventbus Reference Manual

This is the eventbus Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 05:07:49 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 eventbus

An event bus in Common Lisp.

Maintainer

noloop <>

Author

noloop <>

Home Page

https://github.com/noloop/eventbus

Source Control

(GIT git@github.com:noloop/eventbus.git)

Bug Tracker

https://github.com/noloop/eventbus/issues

License

GPLv3

Version

0.1.0

Source

eventbus.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 eventbus/src

Source

eventbus.asd.

Parent Component

eventbus (system).

Child Components

4 Files

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


4.1 Lisp


4.1.1 eventbus/eventbus.asd

Source

eventbus.asd.

Parent Component

eventbus (system).

ASDF Systems

eventbus.


4.1.2 eventbus/src/package.lisp

Source

eventbus.asd.

Parent Component

src (module).

Packages

noloop.eventbus.


4.1.3 eventbus/src/eventbus.lisp

Dependency

package.lisp (file).

Source

eventbus.asd.

Parent Component

src (module).

Public Interface
Internals

make-listener (function).


5 Packages

Packages are listed by definition order.


5.1 noloop.eventbus

Source

package.lisp.

Nickname

eventbus

Use List

common-lisp.

Public Interface
Internals

make-listener (function).


6 Definitions

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


6.1 Public Interface


6.1.1 Ordinary functions

Function: emit (eventbus event-name &rest args)

Emite an event by passing the arguments offered to the listener function. If the listener is once, then the listener is excluded from the list of listeners.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: get-all-events-name (eventbus)

Return one list with all name of events of the eventbus. The list returned includes add-listener and remove-listener.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: get-all-listeners-of-event (eventbus event-name)

Return two values, the value: list of listeners of the event, and present-p: list is present.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: get-listener-count-of-event (eventbus event-name)

Return length listeners of event. Return nil if event nonexistent.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: make-eventbus ()

Return eventbus instance.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: off (eventbus event-name listener-fn)

Remove the first listener from the event listeners list.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: on (eventbus event-name listener-fn)

Add one listener to an event. The add-listener event is emitted before adding the new listener.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: once (eventbus event-name listener-fn)

Add one listener to an event. The listener is removed when the event is emitted. The add-listener event is emitted before adding the new listener.

Package

noloop.eventbus.

Source

eventbus.lisp.

Function: remove-all-listeners-of-event (eventbus event-name)

Removing all listeners from the event. Will be called the off function for each listener, so the remove-listener event is emitted correctly for each listener removed.

Package

noloop.eventbus.

Source

eventbus.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: make-listener (listener-fn is-once)

It returns a list, the first element being a listener function, and the following being a boolean saying if it is an once listener.

Package

noloop.eventbus.

Source

eventbus.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables