access

API Reference

access

A library providing functions that unify data-structure access for Common Lisp: access and (setf access)

ACCESS

  • Condition ACCESS-WARNING  (WARNING, ACCESS-CONDITION)
  • Function EQUALPER (x y)
    compares symbols by equalp symbol-name
  • Generic-Function PLIST-VAL (id list &key test key)
    get a value out of a plist based on its key
  • Method PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Method PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Method PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Generic-Function REM-PLIST-VAL (id list &key test key)
    removes key & its value from plist returning (values plist (list-of-values-removed))
  • Method REM-PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Method REM-PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Method REM-PLIST-VAL (id list &key (test #'equalper) (key #'identity))
  • Macro REM-PLIST-VAL! (id place &key (test '#'equalper) (key '#'identity))
  • Generic-Function SET-PLIST-VAL (new id list &key test key)
    If a key exists in the plist, set its value, otherwise add this key to the dictionary
  • Method SET-PLIST-VAL (new id list &key (test #'equalper) (key #'identity))
  • Method SET-PLIST-VAL (new id list &key (test #'equalper) (key #'identity))
  • Method SET-PLIST-VAL (new id list &key (test #'equalper) (key #'identity))
  • Macro SET-PLIST-VAL! (new id place &key (test '#'equalper) (key '#'identity))
  • Function CLASS-OF-OBJECT (o)
    returns the class of the object/symbol (or itself if it is a class), if passed a list returns a list of these results
  • Generic-Function CLASS-SLOTS (o)
    returns the slots for the class/obj or list of class/obj passed in
  • Method CLASS-SLOTS (o)
  • Method CLASS-SLOTS (o)
  • Method CLASS-SLOTS (o)
  • Function CLASS-SLOT-DEFINITIONS (o)
  • Function CLASS-DIRECT-SLOT-READERS (o)
    ensures o is a class (or list thereof) and returns all the direct slot reader functions)
  • Function CLASS-SLOT-READERS (o)
  • Function CLASS-DIRECT-SLOT-WRITERS (o)
  • Function CLASS-SLOT-WRITERS (o)
  • Function CLASS-DIRECT-SLOTS (o)
  • Function CLASS-DIRECT-SLOT-NAMES (o)
  • Function CLASS-SLOT-NAMES (o)
  • Function CLASS-SLOT-BY-NAME (o k &key (test #'equalper))
  • Function ENSURE-SLOT-NAME (sn)
  • Function HAS-READER? (o reader-name &aux (match (ensure-slot-name reader-name)))
    For o, does a reader function exist for it
  • Function HAS-WRITER? (o writer-name &aux (match (ensure-slot-name writer-name)))
    For o, does a writer function exist for it?
  • Function GET-SLOT-VALUE (o sn)
    like slot-value but without boundedness errors and works with slot definitions
  • Function HAS-SLOT? (o slot-name &key (lax? t))
    Does o have a slot named slot-name if lax? we will ignore packages to find the slot we will always return a slot-name from the specified package if it exists, otherwise we return the slot-name we found if its in a different package
  • Function CALL-IF-APPLICABLE (o fn &key (warn-if-not-a-fn? t))
    See if there is a method named fn specialized on o, or a function named fn and call it if so TODO: dont call macro functions/special forms, they are not applicable
  • Function CALL-APPLICABLE-FNS (o &rest fns)
    For an object and a list of fn/fn names, call-if-applicable repeatedly
  • Generic-Function DO-ACCESS (o k &key type test key skip-call?)
  • Method DO-ACCESS (o k &key type test key skip-call?)
  • Method DO-ACCESS (o k &key type test key skip-call?)
  • Method DO-ACCESS (o k &key type test key skip-call?)
  • Method DO-ACCESS ((o hash-table) k &key type test key skip-call?)
  • Method DO-ACCESS ((o hash-table) k &key type test key skip-call?)
  • Method DO-ACCESS ((o hash-table) k &key type test key skip-call?)
  • Method DO-ACCESS ((o array) k &key type test key skip-call?)
  • Method DO-ACCESS ((o array) k &key type test key skip-call?)
  • Method DO-ACCESS ((o array) k &key type test key skip-call?)
  • Method DO-ACCESS ((o list) k &key type test key skip-call?)
  • Method DO-ACCESS ((o list) k &key type test key skip-call?)
  • Method DO-ACCESS ((o list) k &key type test key skip-call?)
  • Function ACCESS (o k &key type (test #'equalper) (key #'identity) skip-call?)
    Access plists, alists, arrays, hashtables and clos objects all through the same interface skip-call, skips trying to call
  • Generic-Function DO-SET-ACCESS (new o k &key type test key)
  • Method DO-SET-ACCESS (new (o list) k &key type test key)
  • Method DO-SET-ACCESS (new (o list) k &key type test key)
  • Method DO-SET-ACCESS (new (o list) k &key type test key)
  • Method DO-SET-ACCESS (new o k &key type test key)
  • Method DO-SET-ACCESS (new o k &key type test key)
  • Method DO-SET-ACCESS (new o k &key type test key)
  • Function SET-ACCESS (new o k &key type (test #'equalper) (key #'identity))
    set places in plists, alists, hashtables and clos objects all through the same interface
  • Function ACCESSES (o &rest keys)
    keep accessing keys on resulting objects eg: (accesses o k1 k2) => (access (access o k1) k2)
  • Function SET-ACCESSES (new o &rest keys)
    keep accessing till you get to the end of keys , then store the result of setting that field back up the call tree returns the new value and the object that was stored there (so for a plist / alist you have a ref to the val and the full list)
  • Function MUTATE-ACCESS (o k fn)
    Mutate the value stored in key k on object o, by passing it through fn
  • Function ACCESS-COPY (from to keys)
    Copy the values on 'from' to 'to' for all of the keys listed
  • Macro WITH-ACCESS ((&rest keys) val-form &body body)
    Similar to with-accessors except using the access functions
  • Macro WITH-ACCESS-VALUES ((&rest bindings) obj &body body)
    A macro which binds local variables from accessed values on object according to bindings bindings: (local-symbol-and-access-key or (local-symbol access-key) ...) obj: the thing we are accessing data from
  • Macro WITH-ALL-SLOT-ACCESSORS ((data class-name) &body body)
    A macro which binds (like with-access) all slot names of a class to a local symbolmacro let storing and retrieving using access class-name: a symbol or a list of class-names (symbols) to make this easier to call we ignore quote and or eg: 't1=>t1, (or 't1 't2 ...)=> (t1 t2 ...)
  • Macro WITH-ALL-SLOT-ACCESS-VALUES ((obj class) &body body)
    A macro which binds local variables for each slot value in class as by access
  • Function SPLIT-DOT-SYM (sym)
  • Macro WITH-DOT (nil &body body)
  • Macro ENABLE-DOT-SYNTAX
    Enable reader syntax.
  • Macro DISABLE-DOT-SYNTAX
    Restore readtable which was active before last call to If there was no such call, the standard readtable is used.
  • Generic-Function ARG-LIST-KEY-VALUE (id arg-list &key test key)
    Given an &rest value that contains a (partial) lambda list with keys somewhere in it, find the specified value for a given key
  • Method ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity))
  • Method ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity))
  • Method ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity))
  • Generic-Function SET-ARG-LIST-KEY-VALUE (new id arg-list &key test key ensure?)
    Set the keyword parameter id to the value new if ensure? then only set if it doesnt exist (in which case new acts as a default)
  • Method SET-ARG-LIST-KEY-VALUE (new id arg-list &key (test #'equalper) (key #'identity) ensure?)
  • Method SET-ARG-LIST-KEY-VALUE (new id arg-list &key (test #'equalper) (key #'identity) ensure?)
  • Method SET-ARG-LIST-KEY-VALUE (new id arg-list &key (test #'equalper) (key #'identity) ensure?)
  • Generic-Function ENSURE-ARG-LIST-KEY-VALUE (default id arg-list &key test key)
    Ensure that a specific keyword has a value (or default) in an appliable arg list
  • Method ENSURE-ARG-LIST-KEY-VALUE (default id arg-list &key (test #'equalper) (key #'identity))
  • Method ENSURE-ARG-LIST-KEY-VALUE (default id arg-list &key (test #'equalper) (key #'identity))
  • Method ENSURE-ARG-LIST-KEY-VALUE (default id arg-list &key (test #'equalper) (key #'identity))
  • Generic-Function REM-ARG-LIST-KEY-VALUE (id arg-list &key test key)
    Remove a specific keyword and value from the
  • Method REM-ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity) &aux removed-val)
  • Method REM-ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity) &aux removed-val)
  • Method REM-ARG-LIST-KEY-VALUE (id arg-list &key (test #'equalper) (key #'identity) &aux removed-val)
  • Macro SET-ARG-LIST-KEY-VALUE! (new ids place &key (test '#'equalper) (key '#'identity))
  • Macro ENSURE-ARG-LIST-KEY-VALUE! (default ids place &key (test '#'equalper) (key '#'identity))
  • Macro REM-ARG-LIST-KEY-VALUE! (ids place &key (test '#'equalper) (key '#'identity))