summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2016-12-22 06:42:44 +0700
committerDaniil Baturin <daniil@baturin.org>2016-12-22 06:42:44 +0700
commit53c65bd44ace64c39bb3019cf6884e929ebc6f4d (patch)
tree33e1813e2038e8be60e85084178d428999d90301 /src
parent245128cf5b877ecf9821d677e789d7ba9e7fe7cc (diff)
parent3e66b20e08e4c3271a13797dade33426cad3fde0 (diff)
downloadvyconf-53c65bd44ace64c39bb3019cf6884e929ebc6f4d.tar.gz
vyconf-53c65bd44ace64c39bb3019cf6884e929ebc6f4d.zip
Merge branch 'philsummers-master'
Diffstat (limited to 'src')
-rw-r--r--src/config_tree.ml22
-rw-r--r--src/config_tree.mli10
2 files changed, 32 insertions, 0 deletions
diff --git a/src/config_tree.ml b/src/config_tree.ml
index b97f150..f99c737 100644
--- a/src/config_tree.ml
+++ b/src/config_tree.ml
@@ -8,6 +8,8 @@ exception Useless_set
type config_node_data = {
values: string list;
comment: string option;
+ inactive: bool;
+ ephemeral: bool;
}
type t = config_node_data Vytree.t
@@ -15,6 +17,8 @@ type t = config_node_data Vytree.t
let default_data = {
values = [];
comment = None;
+ inactive = false;
+ ephemeral = false;
}
let make name = Vytree.make default_data name
@@ -84,3 +88,21 @@ let set_comment node path comment =
let get_comment node path =
let data = Vytree.get_data node path in
data.comment
+
+let set_inactive node path inactive =
+ let data = Vytree.get_data node path in
+ Vytree.update node path {data with inactive=inactive}
+
+let is_inactive node path =
+ let data = Vytree.get_data node path in
+ data.inactive
+
+let set_ephemeral node path ephemeral =
+ let data = Vytree.get_data node path in
+ Vytree.update node path {data with ephemeral=ephemeral}
+
+let is_ephemeral node path =
+ let data = Vytree.get_data node path in
+ data.ephemeral
+
+
diff --git a/src/config_tree.mli b/src/config_tree.mli
index ac9c5a9..2c463cb 100644
--- a/src/config_tree.mli
+++ b/src/config_tree.mli
@@ -6,6 +6,8 @@ exception Node_has_no_value
type config_node_data = {
values : string list;
comment : string option;
+ inactive : bool;
+ ephemeral : bool;
}
type t = config_node_data Vytree.t
@@ -25,3 +27,11 @@ val get_value : t -> string list -> string
val set_comment : t -> string list -> string option -> t
val get_comment : t -> string list -> string option
+
+val set_inactive : t -> string list -> bool -> t
+
+val is_inactive : t -> string list -> bool
+
+val set_ephemeral : t -> string list -> bool -> t
+
+val is_ephemeral : t -> string list -> bool