ROSE  0.11.2.0
StatSerializer.h
1 #ifndef ROSE_StatSerializer_H
2 #define ROSE_StatSerializer_H
3 
4 #include <rosePublicConfig.h>
5 #ifdef ROSE_BUILD_BINARY_ANALYSIS_SUPPORT
6 
7 #ifdef ROSE_HAVE_BOOST_SERIALIZATION_LIB
8 
9 #include <boost/serialization/access.hpp>
10 #include <boost/serialization/array.hpp>
11 #include <boost/serialization/base_object.hpp>
12 #include <boost/serialization/nvp.hpp>
13 #include <boost/serialization/split_member.hpp>
14 
15 #include <sys/types.h>
16 
17 // Serialization for struct stat
18 namespace boost {
19 namespace serialization {
20 
21 template<class S>
22 void serialize(S & s, struct stat &x, const unsigned /*version*/) {
23  s & boost::serialization::make_nvp("st_dev", x.st_dev);
24  s & boost::serialization::make_nvp("st_ino", x.st_ino);
25  s & boost::serialization::make_nvp("st_mode", x.st_mode);
26  s & boost::serialization::make_nvp("st_nlink", x.st_nlink);
27  s & boost::serialization::make_nvp("st_uid", x.st_uid);
28  s & boost::serialization::make_nvp("st_gid", x.st_gid);
29  s & boost::serialization::make_nvp("st_rdev", x.st_rdev);
30  s & boost::serialization::make_nvp("st_size", x.st_size);
31  s & boost::serialization::make_nvp("st_blksize", x.st_blksize);
32  s & boost::serialization::make_nvp("st_blocks", x.st_blocks);
33 }
34 
35 } // namespace
36 } // namespace
37 
38 #endif
39 #endif
40 #endif