access

API Reference

access

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

ACCESS

  • Function EQUALPER x y
    compares symbols by equalp symbol-name
  • Method PLIST-VAL id list &key (test (function equalper)) (key (function identity))
  • Method PLIST-VAL id list &key (test (function equalper)) (key (function identity))
  • Method REM-PLIST-VAL id list &key (test (function equalper)) (key (function identity))
  • Method REM-PLIST-VAL id list &key (test (function equalper)) (key (function identity))
  • Macro REM-PLIST-VAL! id place &key (test (quote (function equalper))) (key (quote (function identity)))
  • Method SET-PLIST-VAL new id list &key (test (function equalper)) (key (function identity))
  • Method SET-PLIST-VAL new id list &key (test (function equalper)) (key (function identity))
  • Macro SET-PLIST-VAL! new id place &key (test (quote (function equalper))) (key (quote (function 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
  • 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 (function 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
  • Method DO-ACCESS (o standard-object) k &key type test key skip-call?
  • Method DO-ACCESS (o standard-object) 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 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 (function equalper)) (key (function identity)) skip-call?
    Access plists, alists, arrays, hashtables and clos objects
       all through the same interface
    
       skip-call, skips trying to call 
  • Method DO-SET-ACCESS new (o standard-object) k &key type test key
  • Method DO-SET-ACCESS new (o standard-object) k &key type test key
  • Method DO-SET-ACCESS new (o hash-table) k &key type test key
  • Method DO-SET-ACCESS new (o hash-table) k &key type test key
  • Method DO-SET-ACCESS new (o array) k &key type test key
  • Method DO-SET-ACCESS new (o array) 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
  • Function SET-ACCESS new o k &key type (test (function equalper)) (key (function 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 NAME NIL PACKAGE-NAME COMMON-LISP EXTERNALP T
    Enable reader syntax.
  • Macro DISABLE-DOT-SYNTAX NAME NIL PACKAGE-NAME COMMON-LISP EXTERNALP T
    Restore readtable which was active before last call to If there was no such call, the standard
    readtable is used.
  • Method ARG-LIST-KEY-VALUE id arg-list &key (test (function equalper)) (key (function identity))
  • Method ARG-LIST-KEY-VALUE id arg-list &key (test (function equalper)) (key (function identity))
  • Method SET-ARG-LIST-KEY-VALUE new id arg-list &key (test (function equalper)) (key (function identity)) ensure?
  • Method SET-ARG-LIST-KEY-VALUE new id arg-list &key (test (function equalper)) (key (function identity)) ensure?
  • Method ENSURE-ARG-LIST-KEY-VALUE default id arg-list &key (test (function equalper)) (key (function identity))
  • Method ENSURE-ARG-LIST-KEY-VALUE default id arg-list &key (test (function equalper)) (key (function identity))
  • Method REM-ARG-LIST-KEY-VALUE id arg-list &key (test (function equalper)) (key (function identity)) &aux removed-val
  • Method REM-ARG-LIST-KEY-VALUE id arg-list &key (test (function equalper)) (key (function identity)) &aux removed-val
  • Macro SET-ARG-LIST-KEY-VALUE! new ids place &key (test (quote (function equalper))) (key (quote (function identity)))
  • Macro ENSURE-ARG-LIST-KEY-VALUE! default ids place &key (test (quote (function equalper))) (key (quote (function identity)))
  • Macro REM-ARG-LIST-KEY-VALUE! ids place &key (test (quote (function equalper))) (key (quote (function identity)))