VR-Forces 4.1.1 Class Documentation
DtRadioCommunicationsSettingsRecord.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 namespace makArchives
15 {
16 
20  {
21  public:
22 
24  {
26  CurvedEarth
27  };
28 
30  {
32  ForceColoring
33  };
34 
35  public:
36 
39 
42 
45 
48 
52 
55 
56  virtual float commLineLifetime() const;
57  virtual void setCommLineLifetime( float lifetime );
58 
59  virtual float squawkIndicatorLifetime() const;
60  virtual void setSquawkIndicatorLifetime( float lifetime );
61 
62  virtual float commLineAnimationRate() const;
63  virtual void setCommLineAnimationRate( float rate );
64 
65  virtual float squawkIndicatorAnimationRate() const;
66  virtual void setSquawkIndicatorAnimationRate( float rate );
67 
68  virtual bool displayCommLines() const;
69  virtual void setDisplayCommLines( bool show );
70 
71  virtual bool displaySquawkIndicators() const;
72  virtual void setDisplaySquawkIndicators( bool show );
73 
74  virtual bool displayRadioCommunications() const;
75  virtual void setDisplayRadioCommunications( bool show );
76 
77  virtual CommLineMode communicationLineRenderMode() const;
78  virtual void setCommunicationLineRenderMode( CommLineMode mode );
79 
80  virtual float greatCircleExaggerationAmount() const;
81  virtual void setGreatCircleExaggerationAmount( float amount );
82 
83  virtual DefaultColoringMode defaultColoringMode() const;
84  virtual void setDefaultColoringMode( DefaultColoringMode mode );
85 
87 
90 
91  virtual bool showDefaultFrequency() const;
92  virtual void setShowDefaultFrequency( bool show );
93 
94  virtual void getDefaultFrequencyColor( float& r, float& g, float& b ) const;
95  virtual void setDefaultFrequencyColor( float r, float g, float b );
96 
98 
101 
102  virtual void getFrequencyRangeColor( int rangeIndex, float& r, float& g, float& b ) const;
103  virtual void setFrequencyRangeColor( int rangeIndex, float r, float g, float b );
104 
105  virtual bool frequencyRangeVisibility( int rangeIndex ) const;
106  virtual void setFrequencyRangeVisibility( int rangeIndex, bool show );
107 
108  virtual void getFrequencyRange( int rangeIndex, float& lowFreq, float& highFreq ) const;
109  virtual int addFrequencyRange( float lowFreq, float highFreq );
110 
111  virtual int numFrequencyRanges() const;
112 
114 
116 
117  protected:
118 
119  friend class boost::serialization::access;
120 
124  template<class Archive>
125  void serialize( Archive& ar, /*const*/ unsigned int version )
126  {
127  ar & BOOST_SERIALIZATION_NVP( myDefaultFrequencyColor );
128  ar & BOOST_SERIALIZATION_NVP( myShowDefaultFrequencyFlag );
129  ar & BOOST_SERIALIZATION_NVP( myCommLineLifetime );
130  ar & BOOST_SERIALIZATION_NVP( mySquawkIndicatorLifetime );
131  ar & BOOST_SERIALIZATION_NVP( myCommLineAnimationRate );
132  ar & BOOST_SERIALIZATION_NVP( mySquawkIndicatorAnimationRate );
133  ar & BOOST_SERIALIZATION_NVP( myDisplaySquawkIndicatorsFlag );
134  ar & BOOST_SERIALIZATION_NVP( myDisplayCommLinesFlag );
135  ar & BOOST_SERIALIZATION_NVP( myDisplayRadioCommunicationsFlag );
136  ar & BOOST_SERIALIZATION_NVP( myCommunicationLineRenderMode );
137  ar & BOOST_SERIALIZATION_NVP( myDefaultColoringMode );
138  ar & BOOST_SERIALIZATION_NVP( myFrequencyVisibilities );
139  ar & BOOST_SERIALIZATION_NVP( myFrequencyColors );
140  ar & BOOST_SERIALIZATION_NVP( myFrequencyRanges );
141 
142  if ( version >= 2 )
143  {
144  ar & BOOST_SERIALIZATION_NVP( myGreatCircleExaggerationAmount );
145  }
146  }
147 
148  protected:
149 
153  {
155  : myLowFrequency( 0 )
156  , myHighFrequency( 0 )
157  {}
158 
159  FrequencyRange( float lowFreq, float highFreq )
160  : myLowFrequency( lowFreq )
161  , myHighFrequency( highFreq )
162  {}
163 
167  template<class Archive>
168  void serialize( Archive& ar, /*const*/ unsigned int version )
169  {
170  ar & BOOST_SERIALIZATION_NVP( myLowFrequency );
171  ar & BOOST_SERIALIZATION_NVP( myHighFrequency );
172  }
173 
174  float myLowFrequency, myHighFrequency;
175 
176  };
177 
180  struct Color
181  {
183  : myRed( 1.0f )
184  , myGreen( 1.0f )
185  , myBlue( 1.0f )
186  {}
187 
188  Color( float red, float green, float blue )
189  : myRed( red )
190  , myGreen( green )
191  , myBlue( blue )
192  {}
193 
197  template<class Archive>
198  void serialize( Archive& ar, /*const*/ unsigned int version )
199  {
200  ar & BOOST_SERIALIZATION_NVP( myRed );
201  ar & BOOST_SERIALIZATION_NVP( myGreen );
202  ar & BOOST_SERIALIZATION_NVP( myBlue );
203  }
204 
205  float myRed, myGreen, myBlue;
206 
207  };
208 
209  protected:
210 
212  typedef std::vector<FrequencyRange> FrequencyRangesList;
213 
215  typedef std::map<int,Color> FrequencyRangeColorsMap;
216 
218  typedef std::map<int,bool> FrequencyRangesEnabledMap;
219 
223 
226 
231 
238 
239  };
240 
241 }
242 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)