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:
67804d3
)
Documentation step 6: Properly document text functions.
author
Kim Nguyễn
<kn@lri.fr>
Wed, 17 Oct 2012 11:12:39 +0000
(13:12 +0200)
committer
Kim Nguyễn
<kn@lri.fr>
Wed, 17 Oct 2012 11:14:11 +0000
(13:14 +0200)
xml-tree.hpp
patch
|
blob
|
history
diff --git
a/xml-tree.hpp
b/xml-tree.hpp
index
fd396e7
..
1591285
100644
(file)
--- a/
xml-tree.hpp
+++ b/
xml-tree.hpp
@@
-342,11
+342,43
@@
public:
inline node_t closing(node_t) const;
//Text functions
inline node_t closing(node_t) const;
//Text functions
+ /**
+ * [parent_node(i)] returns the node identifier corresponding to the [i]th
+ * text of the text collection. The result is undefined if [i] does not
+ * denote a valid text identifier.
+ * Runs in O(1) ?
+ */
inline node_t parent_node(int32_t) const;
inline node_t parent_node(int32_t) const;
+
+ /**
+ * [get_text_collection()] returns a pointer to the underlying text collection.
+ * The pointer may be 0 if text indexing was disabled during index creation.
+ * Runs in O(1)
+ */
inline SXSI::TextCollection *get_text_collection() const;
inline SXSI::TextCollection *get_text_collection() const;
+
+ /**
+ * [text_id_range(n)] returns the identifier of the first and last text fragment
+ * that occur below node [n]. Returns (-1, -1) if there are no text fragment
+ * below [n] or if [n] does not denote a valid node.
+ * Runs in O(1) ?
+ */
std::pair<int32_t, int32_t> text_id_range(node_t) const;
std::pair<int32_t, int32_t> text_id_range(node_t) const;
+
+ /**
+ * [text_id(n)] returns the identifier of the text fragment associated with
+ * node [n]. The result is unspecified if [n] is not an attribute data node
+ * or a text node.
+ * Runs in O(1) ?
+ */
int32_t text_id(node_t) const;
int32_t text_id(node_t) const;
- unsigned char* get_text(int32_t) const;
+
+ /**
+ * [get_text(i)] returns the content of the [i]th text stored in the text
+ * collection, has a 0 terminated string.
+ * Runs in O(1) ?
+ */
+ const char* get_text(int32_t) const;
SXSI::TextCollection::document_result prefix(uchar const *s) const;
SXSI::TextCollection::document_result suffix(uchar const *s) const;
SXSI::TextCollection::document_result prefix(uchar const *s) const;
SXSI::TextCollection::document_result suffix(uchar const *s) const;