Commit a119ea85 authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

reset_options/0

parent 0a5534fb
......@@ -106,6 +106,7 @@ initialize :-
command(Command)
)
),
store_default_options,
new_model,
assertz(initialized).
......@@ -152,4 +153,3 @@ biocham_command(_) :-
The additional arguments are given as a list in the last parameter.').
:-devcom('\\begin{todo}Make biocham commands functional. We need to know the result type for the gui... Furthermore, the show, list, enumerate,... commands are not so nice. The print result should be a text or a widget associated to the returned type.\\end{todo}').
......@@ -21,7 +21,9 @@
set_option/2,
set_options/1,
list_model_options/0,
have_to_delete_temporary_files/0
have_to_delete_temporary_files/0,
store_default_options/0,
reset_options/0
]).
......@@ -537,3 +539,23 @@ delete_temporary_files :-
;
assertz(have_to_delete_temporary_files)
).
:- dynamic(default_option/2).
store_default_options :-
retractall(default_option(_, _)),
all_items([kind: option], Items),
forall(
member(option(Option: Value), Items),
assertz(default_option(Option, Value))
).
reset_options :-
biocham_command,
doc('Reset all options to their default values.'),
forall(
default_option(Option, Value),
set_option(Option, Value)
).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment