This is the serializable-object Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:40:57 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
serializable-object
Provides a simple class and API for the objects serializable in a FASL file
Masataro Asai
LGPL
0.1
alexandria
(system).
package.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
serializable-object/serializable-object.asd
serializable-object
(system).
serializable-object/package.lisp
serializable-object
(system).
load-instance
(function).
make-load-form
(method).
save
(generic function).
serializable-object
(class).
*instance*
(special variable).
initialization-form
(macro).
Packages are listed by definition order.
serializable-object
alexandria
.
common-lisp
.
load-instance
(function).
save
(generic function).
serializable-object
(class).
*instance*
(special variable).
initialization-form
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Load an instance from PATHNAME which was used when the object was saved.
The loaded instance should be of type CLASS.
+ When VERBOSE is non-nil, it writes messages to the standard output.
+ When IF-DOES-NOT-EXIST is :error (default), it signals an error when the file is missing.
+ When IF-DOES-NOT-EXIST is nil and the file does not exist, it calls
MAKE-INSTANCE with CLASS, with :pathname parameter and other parameters
specified in ARGS except :if-does-not-exist, :class, :verbose.
Save an instance to a FASL file using the value of PATHNAME slot in the instance.
When PATHNAME is given as an argument,
+ the object is stored in the file specified by PATHNAME,
+ the slot value is _temporarily_ set to this value while saving the instance,
+ and the value of PATHNAME is used to save the PATHNAME slot in the saved object.
If STORE is non-nil when PATHNAME is given, PATHNAME also overwrites the slot value in the runtime object. Otherwise the PATHNAME slot value is restored to the original value after returning from this function.
If PARENTS is non-nil (default: t), ENSURE-DIRECTORIES-EXIST is called to
ensure that the path exists.
When an error occurs during the call to SAVE (e.g. nonexisting directory or permission error),
the path is reverted to the original value.
How it works:
1. SAVE generic-function stores a single line of macro (initialization-form) to
a temporary file and compiles a file under the dynamic environment where a
special variable *instance* is bound to the object to be stored.
2. The file compiler expands the macro to the code that sets *instance* to the
value of *instance*. MAKE-LOAD-FORM expands the value into a loadable form.
3. To load the instance, LOAD-INSTANCE function sets up a dynamic binding for
*instance* and load the compiled file in this dynamic environment. The
compiled code sets the newly created object (by evaluating the form produced
by make-load-form) to *instance*. LOAD-INSTANCE retrieves this value.
serializable-object
) &key verbose parents compression overwrite &allow-other-keys) ¶serializable-object
) &key pathname store &allow-other-keys) ¶serializable-object
) &optional env) ¶Jump to: | F G I L M S |
---|
Jump to: | F G I L M S |
---|
Jump to: | *
P S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*instance* : | Private special variables | ||
| |||
P | |||
pathname : | Public classes | ||
| |||
S | |||
Slot, pathname : | Public classes | ||
Special Variable, *instance* : | Private special variables | ||
|
Jump to: | *
P S |
---|
Jump to: | C F P S |
---|
Jump to: | C F P S |
---|