Fix 'occurred' typo
[bpdyndnsd] / src / serializeservicecontainer.cpp
... / ...
CommitLineData
1/** @file
2 * @brief SerializeServiceContainer class implementation. This class contains Service objects in a list for serialization.
3 *
4 *
5 *
6 * @copyright Intra2net AG
7 * @license GPLv2
8*/
9
10#include "serializeservicecontainer.hpp"
11
12// Following boost macros are needed for serialization of derived classes through a base class pointer (Service *).
13BOOST_CLASS_EXPORT_GUID(ServiceOds, "ServiceOds")
14BOOST_CLASS_EXPORT_GUID(ServiceDhs, "ServiceDhs")
15BOOST_CLASS_EXPORT_GUID(ServiceDyns, "ServiceDyns")
16BOOST_CLASS_EXPORT_GUID(ServiceDyndns, "ServiceDyndns")
17BOOST_CLASS_EXPORT_GUID(ServiceEasydns, "ServiceEasydns")
18BOOST_CLASS_EXPORT_GUID(ServiceTzo, "ServiceTzo")
19BOOST_CLASS_EXPORT_GUID(ServiceZoneedit, "ServiceZoneedit")
20BOOST_CLASS_EXPORT_GUID(ServiceGnudip, "ServiceGnudip")
21BOOST_CLASS_EXPORT_GUID(ServiceGnudipFullhostname, "ServiceGnudipFullhostname")
22
23
24SerializeServiceContainer::SerializeServiceContainer()
25{
26}
27
28
29SerializeServiceContainer::~SerializeServiceContainer()
30{
31}
32
33/**
34 * Serialize function needed by boost/serialization to define which members should be stored as the object state.
35 * In this case the STL list of Service pointers will be serialized.
36 * @param ar Archive
37 * @param version Version
38 */
39/*
40template<class Archive>
41void SerializeServiceContainer::serialize(Archive & ar, const unsigned int version)
42{
43 ar & ContainingServices;
44}
45*/
46
47void SerializeServiceContainer::add_service(Service::Ptr service)
48{
49 ContainingServices.push_back(service);
50}
51
52
53std::list<Service::Ptr> SerializeServiceContainer::get_containing_services() const
54{
55 return ContainingServices;
56}