Module Bigraph.Ctrl
type param
=
|
I of int
Integer parameter
|
F of float
Float parameter
|
S of Stdlib.String.t
String parameter
The type of control parameters.
type t
=
|
C of Stdlib.String.t * param list * int
C (s, ps, ar)
creates a control of arityar
nameds
with parametersps
.
val arity : t -> int
arity c
returns the arity of controlc
.
val compare : t -> t -> int
Comparison function. Equal control names imply equal arities and parameter types. Note, no check is performed.
val long_name : t -> string
Return a string containing the name of a control and the values of its parameters. For example,
long_name (C (S,[I 3;F 4.6],3))
produces the string"S(3,4.6)"
.
val name : t -> string
name c
returns the name of controlc
.
val of_string : string -> t
Opposite of
Ctrl.to_string
.- raises Invalid_argument
if the input cannot be parsed.
val parse_name : string -> int -> t
parse_name s ar
returns a control of arityar
obtained by parsing strings
.
val to_string : t -> string
to_string c
gives the string representation of controlc
in the form"name:arity"
or"name(par_0,par_1,...,par_n):arity"
.