Boost logo

Boost-Commit :

From: chintanraoh_at_[hidden]
Date: 2008-06-01 13:39:27


Author: chintanraoh
Date: 2008-06-01 13:39:26 EDT (Sun, 01 Jun 2008)
New Revision: 46024
URL: http://svn.boost.org/trac/boost/changeset/46024

Log:
modified this to give more template arguments to cursor.
Text files modified:
   sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp | 14 +++++++++++---
   1 files changed, 11 insertions(+), 3 deletions(-)

Modified: sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp
==============================================================================
--- sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp (original)
+++ sandbox/SOC/2008/digital_searching/dsearch/boost/dsearch/trie.hpp 2008-06-01 13:39:26 EDT (Sun, 01 Jun 2008)
@@ -6,7 +6,8 @@
 #include<stack>
 #include<algorithm>
 #include<assert.h>
-#include <boost/dsearch/node_cursor.hpp>
+#include<boost/dsearch/node_cursor.hpp>
+#include<boost/dsearch/trie_iterator.hpp>
 
 namespace boost{
 namespace dsearch{
@@ -41,7 +42,8 @@
         typedef typename allocator_type::size_type size_type;//should actually depend on iterator(.|?)
         typedef typename allocator_type::difference_type difference_type; //should actually depend on iterator(.|?)
         
- typedef trie_cursor<node_type> cursor;
+ typedef trie_cursor<key_type,data_type,node_type> cursor;
+ typedef trie_iterator<key_type,data_type,cursor> iterator;
 
         trie()
         {
@@ -181,11 +183,17 @@
                 node_root=node_allocator.allocate(1);
                 new(node_root) node_type();
         }
-
+
+ iterator begin()
+ {
+ return iterator(root());
+ }
+
         cursor root()
         {
                 return cursor(node_root);
         }
+
         
         ~trie()
         {


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