fractalide / fractalide-oz

Proof of concept
GNU Affero General Public License v3.0
12 stars 3 forks source link

Bufferarguments #15

Closed dmichiels closed 10 years ago

dmichiels commented 10 years ago

Two changes : 1) fix #7 The size of the buffer is now 25 by default, and can be specified at component creation. For that the inPort and inArrayPorts declaration have change : instead of

component{inPort(name: proc ... end)
                   inArrrayPort(name: proc ... end)

we have

component{inPort(name( proc ... end))
                   inArrrayPort(name(proc ... end))

In the record name(proc...end), we can add an feature "size" that specifiy the size of the buffer for this input port, like

name(proc ... end
          size:10)

This feature is optional.

2) fix #9 The arguments given to all procedures in component (input port procedures and independant procedures) are changed. From :

proc{$ In Out Var Options State} ... end
proc {$ Out Var Options State} ... end

to

proc {$ In Out Component} ... end
proc{$ Out Component} ... end

Component is the record representing the component, so Var == Component.var, Options == Component.options, ... More informations are available.

sjmackenzie commented 10 years ago

The buffer size is a nice touch! Also the In Out & Component makes it more clear! Thanks!