Get rid of the compiler warning about strict aliasing rule.
[bpdyndnsd] / src / serializeservicecontainer.h
CommitLineData
e0080b78
BS
1/** @file
2 * @brief SerializeServiceContainer class header. This class holds Service objects in a list for serialization.
3 *
4 *
5 *
6 * @copyright Intra2net AG
7 * @license GPLv2
8*/
9
10#ifndef SERIALIZESERVICECONTAINER_H
11#define SERIALIZESERVICECONTAINER_H
12
13#include <list>
14
15#include "service.h"
16#include "logger.h"
17
18#include <boost/serialization/array.hpp>
19#include <boost/shared_ptr.hpp>
20
21class SerializeServiceContainer
22{
23
24private:
25
26 std::list<Service::Ptr> ContainingServices;
27
28 friend class boost::serialization::access;
29 template<class Archive>
e8d4a6f8 30 void serialize(Archive & ar, const unsigned int version);
e0080b78
BS
31
32public:
33
34 typedef boost::shared_ptr<SerializeServiceContainer> Ptr;
35
36 SerializeServiceContainer();
37
38 ~SerializeServiceContainer();
39
40 void add_service(Service::Ptr service);
41
42 std::list<Service::Ptr> get_containing_services() const;
43
44};
45
46#endif