VR-Forces 4.1.1 Class Documentation
DtVrfSessionSettingsRecord.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 #include <vrfGuiCore/vrfGuiCore.h>
15 
16 #include <boost/serialization/access.hpp>
17 #include <boost/serialization/nvp.hpp>
18 #include <boost/serialization/list.hpp>
19 #include <boost/serialization/map.hpp>
20 #include <boost/serialization/vector.hpp>
21 #include <boost/serialization/string.hpp>
22 
23 namespace makVrf
24 {
26  {
27  public:
29  {
30  DtAutoJoinSession = 0x00000001,
31  DtAskToJoin = 0x00000002,
32  DtAlwaysJoinWithSessionDatabase = 0x00000004,
33  DtAlwaysJoinWithOpenDatabase = 0x00000008,
34  DtShowSessionDialogs = 0x00000010,
35  DtDisplayCorrelationWarningMessages = 0x00000020,
36  DtShowSessionStartupDialog = 0x00000040,
37  DtStartOnNewVRTheWorld = 0x00000080,
38  DtStartOnNewScenario = 0x00000100,
39  DtStartOnLoadScenario = 0x00000200,
40  DtAggregateOnCreate = 0x00000400,
41  DtUserDefinedSmoothing = 0x00000800,
42  DtShowScenarioDescriptionDialog = 0x00001000,
43  DtZoomToScenarioExtentsOnLoad = 0x00002000,
44  };
45 
46  public:
49 
50  virtual ~DtVrfSessionSettingsRecord();
51 
52  public:
53 
54  virtual void setFlag(int flag, bool set);
55 
56  void setAutoJoinSession(bool);
57  bool autoJoinSession() const;
58 
59  void setAskToJoin(bool);
60  bool askToJoin() const;
61 
62  void setAlwaysJoinWithSessionDatabase(bool);
63  bool alwaysJoinWithSessionDatabase() const;
64 
65  void setAlwaysJoinWithOpenDatabase(bool);
66  bool alwaysJoinWithOpenDatabase() const;
67 
68  void setDisplaySessionDialogs(bool);
69  bool displaySessionDialogs() const;
70 
71  void setZoomToScenarioExtentsOnLoad(bool);
72  bool zoomToScenarioExtentsOnLoad() const;
73 
74  void setDisplayCorrelationWarningMessages(bool);
75  bool displayCorrelationWarningMessages() const;
76 
77  void setShowSessionStartupDialog(bool);
78  bool showSessionStartupDialog() const;
79 
80  void setStartupPreference(int);
81  int startupPreference() const;
82 
83  void setAggregateOnCreate(bool);
84  bool aggregateOnCreate() const;
85 
86  void setShowScenarioDescriptionDialog(bool);
87  bool showScenarioDescriptionDialog() const;
88 
90  void setUserDefinedSmoothing(bool);
91  bool userDefinedSmoothing() const;
92 
94  void setHelpFile(const std::string&);
95  const std::string& helpFile() const;
96 
97  void setDefaultScenarioFile(const std::string&);
98  const std::string& defaultScenarioFile() const;
99 
100  void setDefaultSimulationModelSetFile(const std::string&);
101  const std::string& defaultSimulationModelSetFile() const;
102 
103  protected:
104  friend class boost::serialization::access;
105 
109  template<class Archive>
110  void serialize(Archive & ar, const unsigned int version)
111  {
112  ar & BOOST_SERIALIZATION_NVP(mySessionOptions);
113 
114  if ((version == 1) && (Archive::is_loading::value))
115  {
116  setFlag(DtShowSessionStartupDialog, true);
117  }
118  else if ((version == 2) && (Archive::is_loading::value))
119  {
120  myHelpFile = "../doc/help/vr-forces_help.qhc";
121  }
122  else if (version >= 4)
123  {
124  ar & BOOST_SERIALIZATION_NVP(myHelpFile);
125  ar & BOOST_SERIALIZATION_NVP(myDefaultScenarioFile);
126  ar & BOOST_SERIALIZATION_NVP(myDefaultSimulationModelSetFile);
127  }
128  }
129 
130  protected:
132  std::string myHelpFile;
135  };
136 }
137 

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)