LCOV - code coverage report
Current view: top level - vset/vtree/aspect - ad_restore.hpp (source / functions) Hit Total Coverage
Test: v-set-coverage.info Lines: 6 8 75.0 %
Date: 2019-09-12 Functions: 3 4 75.0 %

          Line data    Source code
       1             : //
       2             : // Author: Vladimir Migashko <migashko@gmail.com>, (C) 2012, 2013
       3             : //
       4             : // Copyright: See COPYING file that comes with this distribution
       5             : //
       6             : 
       7             : #ifndef VSET_VTREE_ASPECT_AD_RESTORE_HPP
       8             : #define VSET_VTREE_ASPECT_AD_RESTORE_HPP
       9             : 
      10             : #include <vset/vtree/aspect/tags.hpp>
      11             : #include <utility>
      12             : 
      13             : namespace vset{ namespace vtree{
      14             : 
      15           2 :   struct ad_restore
      16             : {
      17             :   template<typename T>
      18           2 :   void operator()(T& t)
      19             :   {
      20             :     typedef typename T::allocator_type::memory_type::pointer pointer;
      21           2 :     pointer beg = t.get_allocator().memory().begin();
      22           2 :     pointer end = t.get_allocator().memory().end();
      23           2 :     for (;beg != end; ++beg)
      24             :     {
      25           0 :       t.get_aspect().template get<_insert_to_container_>()(t, std::make_pair( beg->front(), beg->back() ), beg);
      26           0 :       t.get_aspect().template get<_size_>() += beg->size();
      27             :     }
      28           2 :   }
      29             : };
      30             : 
      31             : }}
      32             : 
      33             : #endif

Generated by: LCOV version 1.10