/******************************************************************************
** Copyright (c) 2012 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/
//! \file DtMetadataPublisherRecord.h
//! \ingroup makArchives

#pragma once

#include <makArchives/makArchives.h>
#include <makArchives/DtSerialize.h>
#include <makArchives/UnicodeStringRecord.h>
#include <makArchives/DtNameValueLists.h>

namespace makArchives
{

   //! \brief Record for a metadata publisher
   //! Defines both the type and parameters
   //! \ingroup makArchives
   class DT_DLL_MAKARCHIVES DtMetadataPublisherRecord : public DtNameValueLists
   {
   public:
      //! CTOR
      DtMetadataPublisherRecord();

      //! Virtual DTOR
      virtual ~DtMetadataPublisherRecord();

      //! Copy CTOR
      DtMetadataPublisherRecord(const DtMetadataPublisherRecord& obj);

      //! Assignment operator
      virtual DtMetadataPublisherRecord& operator=(const DtMetadataPublisherRecord& rhs);

      //! Equality Operator
      virtual bool operator==(const DtMetadataPublisherRecord& rhs);

      //! Inequality Operator
      virtual bool operator!=(const DtMetadataPublisherRecord& rhs);

      //! Get the type of the metadata publisher
      virtual const std::string& publisherType() const;

      //! Set the type of the metadata publisher
      virtual void setPublisherType( const std::string& publisherType );

      //! Get the name of the observer that the publisher will track
      virtual const std::string& observerName() const;

      //! Set name of the observer that the publisher will track
      virtual void setObserverName( const std::string& observerName );

   protected:
      friend class boost::serialization::access;

      template<class Archive>
      void serialize(Archive & ar, const unsigned int version)
      {
         ar & BOOST_SERIALIZATION_NVP(myPublisherType);
         ar & BOOST_SERIALIZATION_NVP(myObserverName);
         ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(DtNameValueLists);
      }

      Utf8String myPublisherType;
      Utf8String myObserverName;
   };
}
BOOST_CLASS_VERSION(makArchives::DtMetadataPublisherRecord, 2)

