./../../src/simple-change-map.lsp

## change-map/simple-change-map [ Classes ]

[ Top ] [ change-map ] [ Classes ]

NAME

     simple-change-map

     File:             simple-change-map.lsp

     Class Hierarchy:  named-object -> linked-named-object -> sclist ->
                       circular-sclist -> assoc-list -> recursive-assoc-list ->
                       sc-map -> change-map -> simple-change-map

     Version:          1.0.6

     Project:          slippery chicken (algorithmic composition)

     Purpose:          Implementation of the simple-change-map class which gives
                       data associated with a non-recursive list of number ids.
                       For example, good for specifying data which changes at
                       specific bar numbers.

     Author:           Michael Edwards: m@michael-edwards.org

     Creation date:    March 31st 2002

     $$ Last modified: 20:16:16 Mon May 14 2012 BST

     SVN ID: $Id: simple-change-map.lsp 5468 2016-01-18 17:29:54Z medward2 $

## simple-change-map/make-simple-change-map [ Functions ]

[ Top ] [ simple-change-map ] [ Functions ]

DESCRIPTION

     Create a simple-change-map object, which stores data associated with a
     non-recursive list of number IDs. This object could be good, for example,
     for specifying data which changes at specific bar numbers.

ARGUMENTS

     - An ID for the simple-change-map object to be created.
     - A list of non-recursive lists consisting of ID/data pairs, of which the
       first item is a numerical ID.

RETURN VALUE

     A simple-change-map object.

EXAMPLE

    (make-simple-change-map 'bar-map '((1 3) (34 3) (38 4)))

    =>
    SIMPLE-CHANGE-MAP:
    CHANGE-MAP: last-ref-required: NIL
    SC-MAP: palette id: NIL
    RECURSIVE-ASSOC-LIST: recurse-simple-data: NIL
                          num-data: 3
                          linked: NIL
                          full-ref: NIL
    ASSOC-LIST: warn-not-found NIL
    CIRCULAR-SCLIST: current 0
    SCLIST: sclist-length: 3, bounds-alert: T, copy: T
    LINKED-NAMED-OBJECT: previous: NIL, this: NIL, next: NIL
    NAMED-OBJECT: id: BAR-MAP, tag: NIL,
    data: (
    NAMED-OBJECT: id: 1, tag: NIL,
    data: 3
    **************

    NAMED-OBJECT: id: 34, tag: NIL,
    data: 3
    **************

    NAMED-OBJECT: id: 38, tag: NIL,
    data: 4
    **************
    )
    **************

SYNOPSIS

    (defun make-simple-change-map (id scm)

## simple-change-map/scm-get-data [ Methods ]

[ Top ] [ simple-change-map ] [ Methods ]

DESCRIPTION

     Get the data associated with the specified key within a given
     simple-change-map object.

ARGUMENTS

     - An integer that is an existing key ID within the given simple-change-map
       object.
     - A simple-change-map-object.

RETURN VALUE

     The data associated with the specified key ID, as a named object.

EXAMPLE

    (let ((scm (make-simple-change-map 'bar-map '((1 3) (34 3) (38 4)))))
      (scm-get-data 34 scm))

    =>
    NAMED-OBJECT: id: 34, tag: NIL,
    data: 3

SYNOPSIS

    (defmethod scm-get-data (ref (scm simple-change-map))