Class Config_file.cp_custom_type
Source
To define a new cp class, you just have to provide an implementation for the wrappers between your type foo
and the type Raw.cp
.
Once you have your wrappers w
, write
class foo_cp = [foo] cp_custom_type w
For further details, have a look at the commented .ml file, section Predefined cp classes.
Accessing methods
method get_name : string list
Resets to the default value.
Miscellaneous
method add_hook : ('a -> 'a -> unit) -> unit
All the hooks are executed each time the method set is called, just after setting the new value.
method set_short_name : string -> unit
Used to generate command line arguments in Config_file.group.command_line_args
.
method get_short_name : string option
None
if no optional short_name was provided during object creation and set_short_name
was never called.
Methods for internal use
method set_raw : Raw.cp -> unit