--- /dev/null
+/** @file
+ * @brief Serviceholder class implementation. This class holds Service objects in a list for serialization.
+ *
+ *
+ *
+ * @copyright Intra2net AG
+ * @license GPLv2
+*/
+
+#include "serviceholder.h"
+
+using namespace std;
+
+
+/**
+ * Default constructor. Invoked on serialization and deserialization.
+ */
+Serviceholder::Serviceholder()
+{
+}
+
+
+/**
+ * Default destructor. While serializing and deserializing we use boost/shared_ptr, the resources are managed correctly.
+ */
+Serviceholder::~Serviceholder()
+{
+}
+
+
+/**
+ * Serialize function needed by boost/serialization to define which members should be stored as the object state.
+ * In this case the STL list of Service pointers will be serialized.
+ * @param ar Archive
+ * @param version Version
+ */
+template<class Archive>
+void Serviceholder::serialize(Archive & ar, const unsigned int version)
+{
+ ar & Hold_services;
+}
+
+
+/**
+ * Add Service * to internal list.
+ * @param service Pointer to Service object.
+ */
+void Serviceholder::add_service(Service * service)
+{
+ Hold_services.push_back(service);
+}
+
+
+/**
+ * Needed after deserialization to get the valid list of Service* back.
+ * @return The list of Service*.
+ */
+std::list<Service*> Serviceholder::get_hold_services()
+{
+ return Hold_services;
+}
--- /dev/null
+/** @file
+ * @brief Serviceholder class header. This class holds Service objects in a list for serialization.
+ *
+ *
+ *
+ * @copyright Intra2net AG
+ * @license GPLv2
+*/
+
+#ifndef SERVICEHOLDER_H
+#define SERVICEHOLDER_H
+
+#include <list>
+
+#include "service.h"
+#include "logger.h"
+
+#include <boost/serialization/array.hpp>
+#include <boost/serialization/list.hpp>
+#include <boost/shared_ptr.hpp>
+
+typedef boost::shared_ptr<Logger> LoggerPtr;
+
+class Serviceholder
+{
+private:
+ friend class boost::serialization::access;
+
+ std::list<Service*> Hold_services;
+
+ template<class Archive>
+ void serialize(Archive &, const unsigned int);
+
+ int Test;
+
+public:
+
+ Serviceholder();
+
+ Serviceholder(LoggerPtr);
+
+ ~Serviceholder();
+
+ void add_service(Service *);
+
+ std::list<Service*> get_hold_services();
+};
+
+#endif