/******************************************************************************
** Copyright (c) 2009 MAK Technologies, Inc.
** All rights reserved.
******************************************************************************/

//! \file DtInterestManagementRecord.h
//! \brief Contains makArchives::DtInterestManagementRecord class.
//! \ingroup makArchives

#ifndef DtInterestManagementRecord_H_
#define DtInterestManagementRecord_H_

#include <makArchives/makArchives.h>

namespace makArchives
{
   //! \brief Record of interest management / DDM settings
   //! \ingroup makArchives
   class DT_DLL_MAKARCHIVES DtInterestManagementRecord
   {
   public:
      //! \brief CTOR
      DtInterestManagementRecord();

      //! \brief Copy CTOR
      DtInterestManagementRecord(const DtInterestManagementRecord& orig);

      //! \brief Assignment OP
      DtInterestManagementRecord& operator=(const DtInterestManagementRecord& orig);

      //! \brief DTOR
      ~DtInterestManagementRecord();

      void setDdmRegionSize(int size);
      int ddmRegionSize() const;

      void setRegionUpdateThreshold(int percentage);
      int regionUpdateThreshold() const;
      
      void setAltitudeThresholdEnabled(bool enabled);
      bool altitudeThresholdEnabled() const;

      void setAltitudeThreshold(int threshold);
      int altitudeThreshold() const;
   protected:

      friend class boost::serialization::access;

      //! When the class Archive corresponds to an output archive, the
      //! & operator is defined similar to <<.  Likewise, when the class Archive
      //! is a type of input archive the & operator is defined similar to >>.
      template<class Archive>
      void serialize(Archive & ar, const unsigned int version)
      {
         ar & BOOST_SERIALIZATION_NVP(myDdmRegionSize);
         ar & BOOST_SERIALIZATION_NVP(myRegionUpdateThreshold);
         ar & BOOST_SERIALIZATION_NVP(myAltitudeThresholdEnabled);
         ar & BOOST_SERIALIZATION_NVP(myAltitudeThreshold);
      }
      
      int myDdmRegionSize;
      int myRegionUpdateThreshold;
      bool myAltitudeThresholdEnabled;
      int  myAltitudeThreshold;
   };
}

#endif

