VR-Forces 4.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  };
44 
45  public:
48 
49  virtual ~DtVrfSessionSettingsRecord();
50 
51  public:
52 
53  virtual void setFlag(int flag, bool set);
54 
55  void setAutoJoinSession(bool);
56  bool autoJoinSession() const;
57 
58  void setAskToJoin(bool);
59  bool askToJoin() const;
60 
61  void setAlwaysJoinWithSessionDatabase(bool);
62  bool alwaysJoinWithSessionDatabase() const;
63 
64  void setAlwaysJoinWithOpenDatabase(bool);
65  bool alwaysJoinWithOpenDatabase() const;
66 
67  void setDisplaySessionDialogs(bool);
68  bool displaySessionDialogs() const;
69 
70  void setDisplayCorrelationWarningMessages(bool);
71  bool displayCorrelationWarningMessages() const;
72 
73  void setShowSessionStartupDialog(bool);
74  bool showSessionStartupDialog() const;
75 
76  void setStartupPreference(int);
77  int startupPreference() const;
78 
79  void setAggregateOnCreate(bool);
80  bool aggregateOnCreate() const;
81 
82  void setShowScenarioDescriptionDialog(bool);
83  bool showScenarioDescriptionDialog() const;
84 
86  void setUserDefinedSmoothing(bool);
87  bool userDefinedSmoothing() const;
88 
90  void setHelpFile(const std::string&);
91  const std::string& helpFile() const;
92 
93  void setDefaultScenarioFile(const std::string&);
94  const std::string& defaultScenarioFile() const;
95 
96  void setDefaultSimulationModelSetFile(const std::string&);
97  const std::string& defaultSimulationModelSetFile() const;
98 
99  protected:
100  friend class boost::serialization::access;
101 
105  template<class Archive>
106  void serialize(Archive & ar, const unsigned int version)
107  {
108  ar & BOOST_SERIALIZATION_NVP(mySessionOptions);
109 
110  if ((version == 1) && (Archive::is_loading::value))
111  {
112  setFlag(DtShowSessionStartupDialog, true);
113  }
114  else if ((version == 2) && (Archive::is_loading::value))
115  {
116  myHelpFile = "../doc/help/vr-forces_help.qhc";
117  }
118  else if (version >= 4)
119  {
120  ar & BOOST_SERIALIZATION_NVP(myHelpFile);
121  ar & BOOST_SERIALIZATION_NVP(myDefaultScenarioFile);
122  ar & BOOST_SERIALIZATION_NVP(myDefaultSimulationModelSetFile);
123  }
124  }
125 
126  protected:
128  std::string myHelpFile;
131  };
132 }
133 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)