module State:sig
..end
A state is a project-compliant mutable value.
include Datatype.S_with_collections
module type Local =sig
..end
Operations on the local state required for registering a new state via
State_builder.Register
.
val get_name : t -> string
Name of a state.
val set_name : t -> string -> unit
Set the name of the given state.
val get_unique_name : t -> string
Unique name of a state.
val unique_name_from_name : string -> string
val dummy : t
A dummy state.
val dummy_unique_name : string
val is_dummy : t -> bool
State.dummy
.exception Unknown
val get : string -> t
Unknown
if there is no such state.val get_descr : t -> Structural_descr.pack
val add_hook_on_update : t -> (unit -> unit) -> unit
Add an hook which is applied each time the project library changes the local value of the state.
All this stuff should not be used outside of the Project library.
type
state_on_disk = {
|
on_disk_value : |
|
on_disk_computed : |
|
on_disk_saved : |
|
on_disk_digest : |
}
type
private_ops = private {
|
descr : |
|||
|
create : |
|||
|
remove : |
|||
|
clear : |
|||
|
clear_some_projects : |
|||
|
copy : |
|||
|
commit : |
|||
|
update : |
|||
|
on_update : |
|||
|
clean : |
|||
|
serialize : |
|||
|
unserialize : |
(* |
| *) |
}
exception Incompatible_datatype of string
val dummy_state_on_disk : state_on_disk
val private_ops : t -> private_ops
val create : descr:Structural_descr.pack ->
create:(Project_skeleton.project -> unit) ->
remove:(Project_skeleton.project -> unit) ->
clear:(Project_skeleton.project -> unit) ->
clear_some_projects:((Project_skeleton.project -> bool) ->
Project_skeleton.project -> bool) ->
copy:(Project_skeleton.project -> Project_skeleton.project -> unit) ->
commit:(Project_skeleton.project -> unit) ->
update:(Project_skeleton.project -> unit) ->
on_update:((unit -> unit) -> unit) ->
clean:(unit -> unit) ->
serialize:(Project_skeleton.project -> state_on_disk) ->
unserialize:(Project_skeleton.project -> state_on_disk -> unit) ->
unique_name:string -> name:string -> t
on_update
argumentval delete : t -> unit