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_FILESYNC_AD_CLEAR_HPP
8 : #define VSET_VSET_BUFFER_PERSISTENT_FILESYNC_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 filesync{
15 :
16 3 : struct ad_clear
17 : {
18 : template<typename T>
19 2 : void operator()( T& t)
20 : {
21 2 : t.get_aspect().template get<_size_value_>() = 0;
22 2 : t.get_aspect().template get<_head_>()(t)->set_size(0);
23 2 : t.get_aspect().template get<_sync_>()(t, 0, 0 );
24 2 : }
25 : };
26 :
27 : }}}}
28 :
29 : #endif
|