Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Formatters for the main resource tree structure
module type Format = sig ... end
Format modules essentially wrap an output function which takes a resource tree as input and produces an output.
type ocaml_format_params = {
width : int;
Maximum line width
*)out_channel : out_channel;
Specify the output
*)}
See OCaml
module OCaml
(SF : OCamlResSubFormats.SubFormat) :
Format with type data = SF.t and type params = ocaml_format_params
This format produces OCaml source code with OCaml submodules for directories and OCaml value definitions for files. It is parametric in the type of leaves and the pretty printing function. It is used by the command line tool as instanciated in OCamlResRegistry
.
type res_format_params = {
width : int;
Maximum line width
*)out_channel : out_channel;
Specify the output
*)use_variants_for_leaves : bool;
If true
, box resources in variants, if false
, use an ad-hoc sum type
use_variants_for_nodes : bool;
Use variants instead of constructors from 'a OCamlRes.Res.node
, to make linking to the OCamlRes
module optional.
}
See Res
module Res
(SF : OCamlResSubFormats.SubFormat) :
Format with type data = SF.t and type params = res_format_params
Produces OCaml source contaiming a single root
value which contains an OCamlRes tree to be used at runtime through the OCamlRes module.
See Files
module Files
(SF : OCamlResSubFormats.SubFormat) :
Format with type data = SF.t and type params = files_format_params
Reproduces the original scanned files (or creates new ones in case of a forged resource store).