VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
radarCoverageAltitudeSettings.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrfutil/vrfutilDefines.h"
16 
17 #include <boost/serialization/nvp.hpp>
18 #include <boost/serialization/base_object.hpp>
19 #include <boost/serialization/export.hpp>
20 
21 #include <boost/archive/xml_iarchive.hpp>
22 #include <boost/archive/xml_oarchive.hpp>
23 #include <boost/archive/text_iarchive.hpp>
24 #include <boost/archive/text_oarchive.hpp>
25 #include <boost/serialization/map.hpp>
26 
27 #define COLOR_TO_INT(r, g, b, a) (unsigned int)((r & 0x000000ff) | ((g << 8) & 0x0000ff00) | ((b << 16) & 0x00ff0000) | ((a << 24) & 0xff000000))
28 #define COLOR_R(c) (unsigned int)(c & 0x000000ff)
29 #define COLOR_G(c) (unsigned int)((c & 0x0000ff00) >> 8)
30 #define COLOR_B(c) (unsigned int)((c & 0x00ff0000) >> 16)
31 #define COLOR_A(c) (unsigned int)((c & 0xff000000) >> 24)
32 
34 {
35 public:
36  typedef std::map<double, unsigned int> AltitudeMap;
37 
40 
42  DtRadarCoverageAltitudeSettings(std::string name);
43 
45  DtRadarCoverageAltitudeSettings(std::string name, const AltitudeMap&);
46 
49 
51  virtual bool operator==(const DtSettingsObject & other) const;
52 
54  virtual bool operator!=(const DtSettingsObject & other) const;
55 
57  virtual DtSettingsObject* clone() const;
58 
59  virtual bool setFrom(const DtSettingsObject* other);
60 
62  virtual void addAltitude(double, unsigned int);
63 
65  virtual bool removeAltitude(double);
66 
68  virtual void setAltitudeMap(const AltitudeMap&);
69 
71  const AltitudeMap& altitudeMap() const
72  {
73  return myAltitudeMap;
74  }
75 
76  virtual std::set<double> altitudes() const;
77 
79  static DtSettingsObject* create(DtSettingsObjectCreationParams& params);
80 
81 protected:
83  void init();
84 
85 private:
86  friend class boost::serialization::access;
88  template<class Archive>
89  void serialize(Archive & ar, const unsigned int version)
90  {
92  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(DtSettingsObject);
93 
95  ar & BOOST_SERIALIZATION_NVP(myAltitudeMap);
96  }
97 
98 protected:
100 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)