//-------------------------------------------------------------------------------------------------
// <copyright file="EventManagerSettings.h" company="LiquidRobotics">
//  Copyright (c) Liquid Robotics Corporation, confidential and proprietary.  All rights reserved. 
// </copyright>
//
// <summary>
//  Declaration of the EventManagerSettings class, which is a serializable entity
//  that holds the settings for the EventManager class.
// </summary>
//
// <owner>Mike Cookson</owner>
//-------------------------------------------------------------------------------------------------

#ifndef EVENTMANAGERSETTINGS_H_
#define EVENTMANAGERSETTINGS_H_

#include <string>
#include <boost/serialization/access.hpp>
#include <boost/serialization/nvp.hpp>
#include "LqrSMACStdOutLoggerSettings.h"

namespace LiquidRobotics {
namespace EventManager {

class EventManagerSettings
{
public:

	typedef LiquidRobotics::SMACFramework::StdOutLoggerSettings StdOutLoggerSettings;
	typedef std::string string;

	EventManagerSettings();
	virtual ~EventManagerSettings();

	string GetEventManagerName() const								{ return eventManagerName; }
	void SetEventManagerName(const string& newValue)				{ eventManagerName = newValue; }

	const StdOutLoggerSettings& GetLoggerSettings() const			{ return loggerSettings; }
	void SetLoggerSettings(const StdOutLoggerSettings& newValue)	{ loggerSettings = newValue; }

	int GetMaxSubscribers() const									{ return maxSubscribers; }
	void SetMaxSubscribers(int newValue)							{ maxSubscribers = newValue; }

	void Load(const string& fileName);
	void Save(const string& fileName);

private:

	friend class boost::serialization::access;

	template<class Archive>
	void serialize(Archive & ar, const unsigned int version)
	{
		ar & BOOST_SERIALIZATION_NVP(eventManagerName);
		ar & BOOST_SERIALIZATION_NVP(maxSubscribers);
		ar & BOOST_SERIALIZATION_NVP(loggerSettings);
	}

	string eventManagerName;
	int maxSubscribers;
	StdOutLoggerSettings loggerSettings;
};

}
}

#endif /* EVENTMANAGERSETTINGS_H_ */
