The fmarshal Reference Manual

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

The fmarshal Reference Manual

This is the fmarshal Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 05:18:53 2022 GMT+0.

Table of Contents


1 Introduction

* Use Cases
** DONE Marshal List
#+BEGIN_SRC lisp
  (fmarshal:load (fmarshal:dump (list 1 (list 2 3) 4)))
  ;; => (1 (2 3) 4)

#+END_SRC

** DONE Marshal Vector
#+BEGIN_SRC lisp
  (fmarshal:load (fmarshal:dump #(1 #(2 3) 4)))
  ;; => #(1 #(2 3) 4)

  (fmarshal:load (fmarshal:dump (make-array (list 2 2) :initial-element 0)))
  ;; => # #2A((0 0) (0 0))

#+END_SRC

** DONE Marshal Hashmap
#+BEGIN_SRC lisp

  (let ((h (make-hash-table :test 'equal)))
    (setf (gethash "blub" h) t)
    (gethash "blub" (fmarshal:load (fmarshal:dump h))))
  ;; => T


#+END_SRC

** DONE Marshal Object
#+BEGIN_SRC lisp
  (defclass test-object ()
    (test-slot))

  (let ((o (make-instance 'test-object)))
    (setf (slot-value o 'test-slot) "blub")
    (slot-value (fmarshal:load (fmarshal:dump o)) 'test-slot))
  ;; => "blub"

#+END_SRC
** DONE Marshal References
#+BEGIN_SRC lisp
  (defclass test-inherited (test-object)
    (object-slot))

  (let ((o (make-instance 'test-inherited)))
    (setf (slot-value o 'test-slot) "blub")
    (setf (slot-value o 'object-slot) o)
    (let ((loaded-object (fmarshal:load (fmarshal:dump o))))
      (values
       (slot-value loaded-object 'test-slot)
       (eq loaded-object (slot-value loaded-object 'object-slot)))))
  ;; => "blub", T

#+END_SRC


2 Systems

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


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

2.1 fmarshal

dump and load objects

Maintainer

Jürgen Bickert <juergenbickert@gmail.com>

Author

Jürgen Bickert <juergenbickert@gmail.com>

License

LGPL

Version

1.0.0

Dependency

closer-mop (system).

Source

fmarshal.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 fmarshal/fmarshal.asd

Source

fmarshal.asd.

Parent Component

fmarshal (system).

ASDF Systems

fmarshal.


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

3.1.2 fmarshal/fmarshal.lisp

Dependency

readme.org (file).

Source

fmarshal.asd.

Parent Component

fmarshal (system).

Packages

fmarshal.

Public Interface
Internals

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

3.2 Static


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

3.2.1 fmarshal/README.org

Source

fmarshal.asd.

Parent Component

fmarshal (system).


4 Packages

Packages are listed by definition order.


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

4.1 fmarshal

Source

fmarshal.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 Ordinary functions

Function: dump (object &optional stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load (stream)
Package

fmarshal.

Source

fmarshal.lisp.


5.2 Internals


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

5.2.1 Special variables

Special Variable: *next-ref*
Package

fmarshal.

Source

fmarshal.lisp.

Special Variable: *refs*
Package

fmarshal.

Source

fmarshal.lisp.


5.2.2 Macros

Macro: maybe-dump-ref (o &body body)
Package

fmarshal.

Source

fmarshal.lisp.


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

5.2.3 Ordinary functions

Function: dump-array (a stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: dump-array-helper (dim a ref stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: dump-hash-table (h stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: dump-ref (ref stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: dump-slot-definitions (object stream)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-array (a)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-array-helper (a ref dim)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-hash-table (test desc)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-helper (desc)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-list (list)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-object (class slots-desc)
Package

fmarshal.

Source

fmarshal.lisp.

Function: load-string (s)
Package

fmarshal.

Source

fmarshal.lisp.

Function: next-ref ()
Package

fmarshal.

Source

fmarshal.lisp.

Function: unmarshalize (stream)
Package

fmarshal.

Source

fmarshal.lisp.


5.2.4 Generic functions

Generic Function: dump-helper (object stream)
Package

fmarshal.

Source

fmarshal.lisp.

Methods
Method: dump-helper (object stream)
Method: dump-helper ((s symbol) stream)
Method: dump-helper ((h hash-table) stream)
Method: dump-helper ((a array) stream)
Method: dump-helper ((l cons) stream)
Method: dump-helper ((n number) stream)
Method: dump-helper ((c character) stream)
Method: dump-helper ((s string) stream)

Appendix A Indexes


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

A.1 Concepts


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

A.2 Functions

Jump to:   D   F   G   L   M   N   U  
Index Entry  Section

D
dump: Public ordinary functions
dump-array: Private ordinary functions
dump-array-helper: Private ordinary functions
dump-hash-table: Private ordinary functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-helper: Private generic functions
dump-ref: Private ordinary functions
dump-slot-definitions: Private ordinary functions

F
Function, dump: Public ordinary functions
Function, dump-array: Private ordinary functions
Function, dump-array-helper: Private ordinary functions
Function, dump-hash-table: Private ordinary functions
Function, dump-ref: Private ordinary functions
Function, dump-slot-definitions: Private ordinary functions
Function, load: Public ordinary functions
Function, load-array: Private ordinary functions
Function, load-array-helper: Private ordinary functions
Function, load-hash-table: Private ordinary functions
Function, load-helper: Private ordinary functions
Function, load-list: Private ordinary functions
Function, load-object: Private ordinary functions
Function, load-string: Private ordinary functions
Function, next-ref: Private ordinary functions
Function, unmarshalize: Private ordinary functions

G
Generic Function, dump-helper: Private generic functions

L
load: Public ordinary functions
load-array: Private ordinary functions
load-array-helper: Private ordinary functions
load-hash-table: Private ordinary functions
load-helper: Private ordinary functions
load-list: Private ordinary functions
load-object: Private ordinary functions
load-string: Private ordinary functions

M
Macro, maybe-dump-ref: Private macros
maybe-dump-ref: Private macros
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions
Method, dump-helper: Private generic functions

N
next-ref: Private ordinary functions

U
unmarshalize: Private ordinary functions

Jump to:   D   F   G   L   M   N   U