% 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
