projects
/
SXSI
/
XMLTree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a48601d
)
Documentation step 4: Properly document tag functions.
author
Kim Nguyễn
<kn@lri.fr>
Tue, 16 Oct 2012 13:09:42 +0000
(15:09 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Tue, 16 Oct 2012 13:14:39 +0000
(15:14 +0200)
xml-tree.hpp
patch
|
blob
|
history
diff --git
a/xml-tree.hpp
b/xml-tree.hpp
index
aba3160
..
4ada586
100644
(file)
--- a/
xml-tree.hpp
+++ b/
xml-tree.hpp
@@
-162,8
+162,28
@@
public:
uint32_t postorder(node_t) const;
//Tag functions
uint32_t postorder(node_t) const;
//Tag functions
+ /**
+ * [tag(n)] returns the tag of node [n] which must be a valid node identifier
+ * (in particular not NIL)
+ * Runs in O(1)
+ */
inline tag_t tag(node_t) const;
inline tag_t tag(node_t) const;
+
+ /**
+ * [get_tag_name_by_ref(t)] returns the string representation of tag [t]
+ * For elements, the string representation is the tag name itself
+ * Returns <!INVALID!> if [t] is not a proper tag identifier.
+ * Runs in O(1)
+ */
const char* get_tag_name_by_ref(tag_t) const;
const char* get_tag_name_by_ref(tag_t) const;
+
+ /**
+ * [register_tag(s)] returns the tag identifier for the tag represented
+ * by the string [s]. If no such tag exists in the document, return a
+ * fresh tag identifier [i]. Subsequent calls with the same [s] will return
+ * the same identifier.
+ * Runs in O(1)
+ */
tag_t register_tag(char *s);
//Navigation functions
tag_t register_tag(char *s);
//Navigation functions