summaryrefslogtreecommitdiff
path: root/src/reference_tree.ml
diff options
context:
space:
mode:
authorPhil Summers <phil@blindlime.org>2016-12-23 00:40:11 +0000
committerPhil Summers <phil@blindlime.org>2016-12-23 00:40:11 +0000
commit87e45fd308babf14f9c9d98a8ba1d89e7f4cd00b (patch)
tree1ea0f6ef1d57f3f7385ea1ade2016925a033c031 /src/reference_tree.ml
parent98072015c4be78f3bb4bb048b07d261287173b81 (diff)
downloadvyconf-87e45fd308babf14f9c9d98a8ba1d89e7f4cd00b.tar.gz
vyconf-87e45fd308babf14f9c9d98a8ba1d89e7f4cd00b.zip
T230: Add missing data access functions to the Reference_tree module with unit tests
Diffstat (limited to 'src/reference_tree.ml')
-rw-r--r--src/reference_tree.ml29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/reference_tree.ml b/src/reference_tree.ml
index 8b26449..29b4265 100644
--- a/src/reference_tree.ml
+++ b/src/reference_tree.ml
@@ -189,3 +189,32 @@ let is_hidden reftree path =
let is_secret reftree path =
let data = Vytree.get_data reftree path in
data.secret
+
+let is_tag reftree path =
+ let data = Vytree.get_data reftree path in
+ match data.node_type with
+ | Tag -> true
+ | _ -> false
+
+let is_leaf reftree path =
+ let data = Vytree.get_data reftree path in
+ match data.node_type with
+ | Leaf -> true
+ | _ -> false
+
+let is_valueless reftree path =
+ let data = Vytree.get_data reftree path in
+ data.valueless
+
+let get_keep_order reftree path =
+ let data = Vytree.get_data reftree path in
+ data.keep_order
+
+let get_owner reftree path =
+ let data = Vytree.get_data reftree path in
+ data.owner
+
+let get_help_string reftree path =
+ let data = Vytree.get_data reftree path in
+ data.help
+