|
Boost-Commit : |
From: chintanraoh_at_[hidden]
Date: 2008-06-09 13:16:43
Author: chintanraoh
Date: 2008-06-09 13:16:43 EDT (Mon, 09 Jun 2008)
New Revision: 46276
URL: http://svn.boost.org/trac/boost/changeset/46276
Log:
get_element function
Text files modified:
sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
Modified: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp
==============================================================================
--- sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp (original)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/node_cursor.hpp 2008-06-09 13:16:43 EDT (Mon, 09 Jun 2008)
@@ -53,12 +53,12 @@
this->cur=other.cur;
}
- trie_cursor(Node * const n_ptr): only_root(1) , top(false)
+ trie_cursor(Node * const &n_ptr): only_root(1) , top(false)
{
cur=n_ptr;
}
- trie_cursor(Node *n_ptr,const node_iterator &it): only_root(0), top(false)
+ trie_cursor(Node* const &n_ptr,const node_iterator &it): only_root(0), top(false)
{
cur=const_cast<Node *>(n_ptr);
pos=it;
@@ -159,6 +159,12 @@
{
return get_node()->get_value_ref();
}
+
+ element_type get_element() const
+ {
+ assert(!only_root && !top);
+ return cur->get_element(pos);
+ }
cursor find(const element_type &e) const
{
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk