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

#pragma once

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

namespace makArchives
{

   //! \brief Record for a visualizer definition (new type)
   //! \ingroup makArchives
   class DT_DLL_MAKARCHIVES DtVisualizerDefinitionAttributeRecord
   {
   public:
      //! CTOR
      DtVisualizerDefinitionAttributeRecord();

      //! DTOR
      virtual ~DtVisualizerDefinitionAttributeRecord();

      //! Set the attribute's name
      void setName(const Utf8String& name);

      //! Set the attribute's string value
      //! This must be the value of the getString() method of some
      //! DtVisualizerAttribute object
      void setValue(const Utf8String& val);

      //! Get the attribute's name
      const Utf8String& name() const;

      //! Get the attribute's string
      //! The only safe thing to do with this is pass it to the setString()
      //! method of a DtVisualizerAttribute object
      const Utf8String& value() const;

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

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

      Utf8String myValue;
      Utf8String myName;
   };
}

BOOST_CLASS_VERSION(makArchives::DtVisualizerDefinitionAttributeRecord, 1)
