Line data Source code
1 : //
2 : // Author: Vladimir Migashko <migashko@gmail.com>, (C) 2012
3 : //
4 : // Copyright: See COPYING file that comes with this distribution
5 : //
6 :
7 : #ifndef VSET_VSET_BUFFER_PERSISTENT_MMAP_AD_CLEAR_HPP
8 : #define VSET_VSET_BUFFER_PERSISTENT_MMAP_AD_CLEAR_HPP
9 :
10 : #include <vset/buffer/tags.hpp>
11 : #include <vset/buffer/persistent/tags.hpp>
12 :
13 :
14 : namespace vset { namespace buffer { namespace persistent{ namespace mmap{
15 :
16 9 : struct ad_clear
17 : {
18 : template<typename T>
19 4 : void operator()( T& t)
20 : {
21 4 : t.get_aspect().template get<_size_value_>() = 0;
22 4 : t.get_aspect().template get<_head_>()(t)->reset();
23 : //t.get_aspect().template get<_head_>()(t)->set_size(0);
24 : //t.get_aspect().template get<_head_>()(t)->set_capacity(0);
25 : //t.get_aspect().template get<_sync_>()(t, 0, 0, true );
26 4 : }
27 : };
28 :
29 : }}}}
30 :
31 : #endif
|