Mercurial > hg > ishara
view arrows/@arrow/mkunit.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children | 5de03f77dae1 |
line wrap: on
line source
% mkunit - Initialise processing unit structure % % This is for use by arrow implementations. It % fills in defaults for the function handles in the % structure representing a live processing unit. % % mkunit :: % arrow(_:arglist(N),_:arglist(M),S) % -> struct { % starting :: () -> action (); % stopping :: () -> action (); % dispose :: () -> action (); % set_state :: S -> action () % get_state :: () -> S. % viewables :: () -> list(samer.core.Viewable) % }. % % NB arrow(A,B,S) denotes an arrow with an accessible state % of type S. It is a subtype of arrow(A,B). % % list(A) denotes the type of cell arrays of objects of % type A, ie list(A) :== {[N]->A} where N can be any % natural number. function u=mkunit(o) u.starting=@nop; u.stopping=@nop; u.dispose=@nop; u.viewables={}; u.get_state=@()[]; u.set_state=@nop; end