VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
indirectArtillerySettingsRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrfGuiCore/vrfGuiCore.h>
14 
15 #include <boost/serialization/access.hpp>
16 #include <boost/serialization/nvp.hpp>
17 #include <boost/serialization/list.hpp>
18 #include <boost/serialization/map.hpp>
19 #include <boost/serialization/vector.hpp>
20 #include <boost/serialization/string.hpp>
21 
22 namespace makVrf
23 {
28  {
29  public:
33 
35 
36  void setAddDetonationsIfMissing(bool);
37  bool addDetonationsIfMissing() const;
38 
39  protected:
40  friend class boost::serialization::access;
41 
45  template<class Archive>
46  void serialize(Archive & ar, const unsigned int version)
47  {
48  ar & BOOST_SERIALIZATION_NVP(myStartTimeImmediate);
49  ar & BOOST_SERIALIZATION_NVP(myStartTime);
50  ar & BOOST_SERIALIZATION_NVP(myTimeBetweenSalvos);
51  ar & BOOST_SERIALIZATION_NVP(myScatterTime);
52  ar & BOOST_SERIALIZATION_NVP(myNumberOfSalvos);
53  ar & BOOST_SERIALIZATION_NVP(myRoundsPerSalvo);
54  ar & BOOST_SERIALIZATION_NVP(myAltitudeAboveTerrain);
55 
56  if (version <= 2)
57  {
58  bool myAddDetonationsIfMissing;
59  ar & BOOST_SERIALIZATION_NVP(myAddDetonationsIfMissing);
60  }
61 
62  if (Archive::is_loading::value)
63  {
64  std::string myMunitionString;
65  ar & BOOST_SERIALIZATION_NVP(myMunitionString);
66  myMunitionType = myMunitionString.c_str();
67  }
68  else
69  {
70  std::string myMunitionString = myMunitionType.string();
71  ar & BOOST_SERIALIZATION_NVP(myMunitionString);
72  }
73  }
74  };
75 }
76 
BOOST_CLASS_VERSION(makArchives::DtDiGuySettingsRecord, 3)
Contains makVrf::DtIndirectArtillerySettingsRecord class. This class holds options for indirect artil...
Definition: indirectArtillerySettingsRecord.h:27
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
Contains the DtSharedSettings class declaration.
void serialize(Archive &ar, const unsigned int version)
When the class Archive corresponds to an output archive, the &amp; operator is defined similar to &lt;&lt;...
Definition: indirectArtillerySettingsRecord.h:46
Data container for Indirect Artillery. Should contain nothing but mutators, accessors and data...
Definition: ifModifyIndirectArtilleryObject.h:28

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)