This is the simple Serviceholder class needed for de/serialization purposes.
[bpdyndnsd] / src / serviceholder.h
CommitLineData
6beab33f
BS
1/** @file
2 * @brief Serviceholder 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 SERVICEHOLDER_H
11#define SERVICEHOLDER_H
12
13#include <list>
14
15#include "service.h"
16#include "logger.h"
17
18#include <boost/serialization/array.hpp>
19#include <boost/serialization/list.hpp>
20#include <boost/shared_ptr.hpp>
21
22typedef boost::shared_ptr<Logger> LoggerPtr;
23
24class Serviceholder
25{
26private:
27 friend class boost::serialization::access;
28
29 std::list<Service*> Hold_services;
30
31 template<class Archive>
32 void serialize(Archive &, const unsigned int);
33
34 int Test;
35
36public:
37
38 Serviceholder();
39
40 Serviceholder(LoggerPtr);
41
42 ~Serviceholder();
43
44 void add_service(Service *);
45
46 std::list<Service*> get_hold_services();
47};
48
49#endif