module OASISSchema:Add fields to _oasis for pluginsig
..end
type'a
t ='a OASISSchema_intern.t
val new_field : 'a t ->
OASISPlugin.all_t ->
OASISTypes.name ->
?default:'b ->
'b OASISValues.t ->
(unit -> string) ->
'c OASISPlugin.prop -> ('a -> 'c -> 'b) -> PropList.Data.t -> 'b
new_field schm plugin_id name value help pivot_data sync
Create a field for a plugin. Create a new field for the plugin defined
by plugin_id
in the schema schm
. The field basename is name
, for which
we will add the name of the plugin and "X"
before -- to know that this
field is related to this plugin. value
defines how to parse/print the
valye. help
is an helper text for this field. pivot_data
and sync
defines
how to match back the datastructure where the result will be stored with
the field in _oasis.
The result of this function is a getter that helps you to get the data
from the field parsed in the _oasis file. You should use it to generate
a datastructure (the one that will be used by sync
).
val new_field_conditional : 'a t ->
OASISPlugin.all_t ->
OASISTypes.name ->
?default:'b ->
'b OASISValues.t ->
(unit -> string) ->
'c OASISPlugin.prop ->
('a -> 'c -> 'b OASISExpr.choices) -> PropList.Data.t -> 'b OASISExpr.choices
OASISSchema.new_field
for explanation.