ROSE 0.11.145.192
StatSerializer.h
1#ifndef ROSE_StatSerializer_H
2#define ROSE_StatSerializer_H
3
4#include <featureTests.h>
5#ifdef ROSE_ENABLE_BINARY_ANALYSIS
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/stat.h>
16#include <sys/types.h>
17
18// Serialization for struct stat
19namespace boost {
20namespace serialization {
21
22template<class S>
23void serialize(S & s, struct stat &x, const unsigned /*version*/) {
24 s & boost::serialization::make_nvp("st_dev", x.st_dev);
25 s & boost::serialization::make_nvp("st_ino", x.st_ino);
26 s & boost::serialization::make_nvp("st_mode", x.st_mode);
27 s & boost::serialization::make_nvp("st_nlink", x.st_nlink);
28 s & boost::serialization::make_nvp("st_uid", x.st_uid);
29 s & boost::serialization::make_nvp("st_gid", x.st_gid);
30 s & boost::serialization::make_nvp("st_rdev", x.st_rdev);
31 s & boost::serialization::make_nvp("st_size", x.st_size);
32 s & boost::serialization::make_nvp("st_blksize", x.st_blksize);
33 s & boost::serialization::make_nvp("st_blocks", x.st_blocks);
34}
35
36} // namespace
37} // namespace
38
39#endif
40#endif
41#endif
void serialize(std::ostream &output, Graph &graph)
Serialize a graph into a stream of bytes.