[closer-devel] Re: layer slots

Attila Lendvai attila.lendvai at gmail.com
Mon Nov 26 19:36:43 UTC 2007


> while working on a new architecture for verrazano where backends are
> layers, i wanted to add slots for layers.

to clarify what i'm trying to achive here: i would like to have slots
on layers that can hold data for "sessions" when the layer is active.

from a different point of view: i would like to represent verrazano
backends (that generate cffi/whatever bindings from gccxml output) as
layers and the layer called 'backend should have a slot called
'output-definition-queue that holds the definitions to be output for a
generation run. then i enable the actual backend layer and i should be
there initialized on the activated layer.

i've added this to my code:

(defun current-layer ()
  (contextl::layer-context-prototype (current-layer-context)))

and access the slot on (current-layer), but that is accessing a slot
of the class prototype with all its undesired consequences for my
use-case.

without contextl i would be doing something very similar: introduce a
first argument called backend, make-instance a backend instance and
dispatch on it on all the methods that are now layered methods.

am i misusing layers here?

-- 
 attila



More information about the closer-devel mailing list