projects
/
SXSI
/
XMLTree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a69b380
)
Add is_open function to test whether an index correspond to an
author
Kim Nguyễn
<kn@lri.fr>
Tue, 24 Apr 2012 13:47:12 +0000
(15:47 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Tue, 24 Apr 2012 13:47:12 +0000
(15:47 +0200)
open parenthesis.
xml-tree-inc.hpp
patch
|
blob
|
history
xml-tree.hpp
patch
|
blob
|
history
diff --git
a/xml-tree-inc.hpp
b/xml-tree-inc.hpp
index
f8ee8b0
..
d5a921f
100644
(file)
--- a/
xml-tree-inc.hpp
+++ b/
xml-tree-inc.hpp
@@
-41,6
+41,11
@@
inline bool xml_tree::is_leaf(xml_tree::node_t x) const
return !bp_inspect(this->par, x+1);
}
+inline bool xml_tree::is_open(xml_tree::node_t x) const
+{
+ return bp_inspect(this->par, x);
+}
+
inline bool xml_tree::is_ancestor(xml_tree::node_t x,
xml_tree::node_t y) const
{
diff --git
a/xml-tree.hpp
b/xml-tree.hpp
index
c2b86ca
..
ff98f21
100644
(file)
--- a/
xml-tree.hpp
+++ b/
xml-tree.hpp
@@
-62,6
+62,7
@@
public:
bool is_child(node_t, node_t) const;
inline bool is_first_child(node_t) const;
inline bool is_nil(node_t) const;
+ inline bool is_open(node_t) const;
uint32_t depth(node_t) const;
uint32_t preorder(node_t) const;