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