Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

RBTreeDBCacheInsertThenDestroySimple.hpp

Go to the documentation of this file.
00001 
00008 #ifndef RBTreeDBCacheInsertThenDestroySimple_HPP
00009 #define RBTreeDBCacheInsertThenDestroySimple_HPP
00010 
00011 #include <vector>
00012 #include <map>
00013 #include "io/db_cache/transaction_shrinker/RBTreeDBCacheInsertThenDestroyBase.hpp"
00014 
00015 namespace Bodon
00016 {
00026    template< class T_R, class BIS = std::vector<item_t> >
00027    class RBTreeDBCacheInsertThenDestroySimple : 
00028          public RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>
00029    {
00030       public:
00031          typedef typename RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>
00032 	 ::params_t params_t;
00033 
00034          RBTreeDBCacheInsertThenDestroySimple( const params_t* par )
00035             : RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>(par){}
00036 
00037          void rewind()
00038          {
00039             for( typename std::map<BIS, counter_t>::iterator it_temp = 
00040                     RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>::temp_rb_tree.begin(); 
00041                  it_temp != RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>::
00042 		    temp_rb_tree.end(); ++it_temp)
00043                RBTreeDBCache<T_R, BIS>::rb_tree[it_temp->first] += 
00044                   it_temp->second;
00045             RBTreeDBCacheInsertThenDestroyBase<T_R, BIS>::rewind();
00046          }
00047    };
00048 
00049 }
00050 #endif

Generated on Sun Sep 17 17:50:39 2006 for FIM environment by  doxygen 1.4.4