cleavir io
1.0.0Utilities for textual I/O of Lisp objects.
The cleavir-io
system defines a macro define-save-info
that can be used to record what information is required to reconstruct a standard object. This save info is used throughout Cleavir to make objects serializable either as text (via print-model-object
, read-model-object
) or by compile-file
with make-load-form
. Reader macro syntax is used, so that for example [foo :bar baz]
can be used as the textual representation of an object of class foo
with one slot value.
System Information
Definition Index
-
CLEAVIR-IO
No documentation provided.-
EXTERNAL SPECIAL-VARIABLE *IO-READTABLE*
A readtable in which [] macro characters are set to use READ-MODEL-OBJECT. See READ-MODEL-OBJECT
-
EXTERNAL FUNCTION READ-MODEL
- FILENAME
- ALLOWED-VERSION-NAMES
No documentation provided. -
EXTERNAL FUNCTION READ-MODEL-OBJECT
- STREAM
- CHAR
Reader macro function to read standard objects. MAKE-INSTANCE is applied to the list read to produce an object.
-
EXTERNAL FUNCTION WRITE-MODEL
- FILENAME
- VERSION-NAME
- OBJECT
No documentation provided. -
EXTERNAL GENERIC-FUNCTION SAVE-INFO
- OBJECT
Return the save-info for an object. This info is used for serialization and deserialization of objects. The save info is a list of (initarg reader). The initarg should be the initarg for a value in an object to save, and READER is the name of a function that will read that value from an object. See DEFINE-SAVE-INFO
-
EXTERNAL MACRO DEFINE-SAVE-INFO
- CLASS
- &BODY
- SAVE-INFO
Define the save-info for a class of objects. The given save-info is not evaluated. Also defines a PRINT-OBJECT method for the class that uses the [] syntax defined in the *IO-READTABLE*. See SAVE-INFO See *IO-READTABLE*
-