This class provides the C++ bindings for C cgul_trie_node
objects. The main purpose of this class is to convert the C-style function calls and exception handling in cgul_trie_node
into C++-style function calls and exception handling. This class must not be extended.
Return the next older node. Together with get_younger()
, this method lets you traverse the trie in chronological order. If there is no older node, this method returns NULL
.
get_older()
and get_younger()
are faster than get_prev()
and get_next()
because the latter pair of functions has to walk the trie to find the previous and next nodes in sort order, but the former pair has direct pointers to the younger and older nodes.
The following example shows how to iterate over the entire trie in reverse chronological order. Notice that you have to start with the youngest node when calling get_older()
:
cgul_trie_node_cxx* n = t->get_youngest();
for ( ; n ; n = n->get_older()) {
...
}
- Returns
- older node
References cgul_trie_node__get_older().
Return the next younger node. Together with get_older()
, this method lets you traverse the trie in chronological order. If there is no younger node, this method returns NULL
.
get_older()
and get_younger()
are faster than get_prev()
and get_next()
because the latter pair of functions has to walk the trie to find the previous and next nodes in sort order, but the former pair has direct pointers to the younger and older nodes.
The following example shows how to iterate over the entire trie in chronological order. Notice that you have to start with the oldest node when calling get_younger()
:
cgul_trie_node_cxx* n = t->get_oldest();
for ( ; n ; n = n->get_younger()) {
...
}
- Returns
- younger node
References cgul_trie_node__get_younger().