VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vrfGuiCommandLineParser.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vrfGuiCore/vrfDe.h>
16 
18 
19 #include <cmdLine/cmdArg.h>
20 #include <cmdLine/cmdLine.h>
21 
22 #include <boost/function.hpp>
23 
24 namespace makVrf
25 {
28  {
29  protected:
30  typedef boost::function<void (std::vector<DtCmdLine::Arg*>&,
32 
33  public:
35 
37 
39  virtual void processCommandLine(makVrv::DtVrvApplicationConfiguration& appConfig, int argc, char** argv);
40 
42  virtual void removeAutoStartDriver();
43 
44  void setAllowObserverModeFlags(bool);
45 
46  protected:
47  struct BaseArgs
48  {
49  virtual void processArgs(makVrv::DtVrvApplicationConfiguration& appConfig, StealthArgs& args, std::string& autoStartDriver) = 0;
50  virtual std::string driverName() const = 0;
51  virtual std::string driverClass() const = 0;
52 
54  DtCmdLine::ValueArg<int>* siteId;
55  DtCmdLine::ValueArg<int>* appId;
56  DtCmdLine::SwitchArg* useAbsoluteTimeStamps;
57  DtCmdLine::ValueArg<int>* fileTransporterReceivePort;
58  };
59 
60  struct DisArgs : public BaseArgs
61  {
62  virtual void processArgs(makVrv::DtVrvApplicationConfiguration& appConfig, StealthArgs& args, std::string& autoStartDriver);
63  virtual std::string driverName() const;
64  virtual std::string driverClass() const;
65 
66  DtCmdLine::ValueArg<int>* port;
67  DtCmdLine::ValueArg<int>* exerciseId;
68  DtCmdLine::ValueArg<int>* disVersion;
69  DtCmdLine::ValueArg<std::string>* destinationAddress;
70  DtCmdLine::ValueArg<std::string>* deviceAddress;
71  DtCmdLine::ValueArg<std::string>* subnetMask;
72  DtCmdLine::ValueArg<std::string>* hostAddress;
73  DtCmdLine::ValueArg<std::string>* appIdRange;
74  DtCmdLine::ValueArg<int>* sessionId;
75  DtCmdLine::ValueArg<int>* receiveBufferSize;
76  DtCmdLine::ValueArg<int>* sendBufferSize;
77  DtCmdLine::SwitchArg* useAsynchIO;
78  DtCmdLine::SwitchArg* useIpv6;
79  DtCmdLine::ValueArg<int>* multicastTTL;
80  DtCmdLine::MultiArg<std::string>* multicastAddresses;
81  DtCmdLine::ValueArg<double>* defaultObjectTimeout;
82  };
83 
84  struct Hla13Args : public BaseArgs
85  {
86  virtual void processArgs(makVrv::DtVrvApplicationConfiguration& appConfig, StealthArgs& args, std::string& autoStartDriver);
87  virtual void setupHlaConfiguration(makVrv::DtConfiguration& config, StealthArgs& args);
88  virtual std::string driverName() const;
89  virtual std::string driverClass() const;
90 
91  DtCmdLine::ValueArg<std::string>* execName;
92  DtCmdLine::ValueArg<std::string>* fedFileName;
93  DtCmdLine::ValueArg<std::string>* fomMapperLibName;
94  DtCmdLine::ValueArg<std::string>* fomMapperInitData;
95  DtCmdLine::ValueArg<std::string>* hostAddress;
96  DtCmdLine::ValueArg<int>* sessionId;
97  DtCmdLine::ValueArg<double>* rprFomVersion;
98  DtCmdLine::ValueArg<int>* rprFomRevision;
99  DtCmdLine::SwitchArg* useAdvisories;
100  DtCmdLine::SwitchArg* useGeographicDdm;
101  DtCmdLine::ValueArg<std::string>* federateType;
102  };
103 
104  struct Hla1516Args : public Hla13Args
105  {
106  virtual std::string driverName() const;
107  virtual std::string driverClass() const;
108  };
109 
110  struct Hla1516eArgs : public Hla13Args
111  {
112  virtual void setupHlaConfiguration(makVrv::DtConfiguration& config, StealthArgs& args);
113 
114  virtual std::string driverName() const;
115  virtual std::string driverClass() const;
116 
117  DtCmdLine::MultiArg<std::string>* fomModule;
118  DtCmdLine::ValueArg<std::string>* federateName;
119  DtCmdLine::ValueArg<std::string>* localSettingsDesignator;
120  };
121 
123  {
124  DtCmdLine::SwitchArg* disMode;
125  DtCmdLine::SwitchArg* hla13Mode;
126  DtCmdLine::SwitchArg* hla1516Mode;
127  DtCmdLine::SwitchArg* hla1516eMode;
128 
129  DtCmdLine::MultiArg<std::string>* pluginsToLoadArg;
130  DtCmdLine::ValueArg<std::string>* loadScenario;
131  DtCmdLine::SwitchArg* doNotLoadDefaultPluginsArg;
132  DtCmdLine::SwitchArg* doNotCheckPluginVersions;
133  DtCmdLine::ValueArg<std::string>* gui;
134  DtCmdLine::ValueArg<std::string>* fowPerspective;
135  DtCmdLine::ValueArg<std::string>* nonVrfObjectsUseUUIDScheme;
136  DtCmdLine::ValueArg<std::string>* useFileCommChannel;
137  DtCmdLine::ValueArg<std::string>* loadSimulationObjectGroup;
138  DtCmdLine::ValueArg<std::string>* defaultSimulationModelSet;
139  DtCmdLine::ValueArg<std::string>* layoutSettingsFile;
140 
141 #ifdef USE_VLD_MEMORY_TRACKING
142  DtCmdLine::SwitchArg* useVld;
143 #endif
144 
146  DtCmdLine::SwitchArg* pvdModeOnly;
147  DtCmdLine::SwitchArg* stealthModeOnly;
148 
149  std::vector<BaseArgs*> additionalArguments;
150 
152  DtCmdLine::SwitchArg* enableLogFileTimestamps;
153  };
154 
156  virtual void processArgs(makVrv::DtVrvApplicationConfiguration& appConfig, StealthArgs& args);
157  virtual std::vector<DtCmdLine::Arg*> createDefaultArguments(VrfGuiArgs& args);
158 
159  virtual void addArgumentParserAddition(const std::string&, DtAdditionalCommandsFcn fcn);
160 
163  BaseArgs*, std::string& autoStarted);
164 
166  const std::string& driverName, const std::string& driverClass, std::string& fullName);
167  virtual std::string createDriverFileName(const makVrv::DtVrvApplicationConfiguration& a,
168  const std::string& driverClass,const std::string& driverName);
169  virtual void addHlaCommandArguments(std::vector<DtCmdLine::Arg*>& a,
171 
173  virtual void bindObserverModes(const std::vector<std::string>&, makVrf::DtVrfGuiApplication::ObserverModeBindings&) const;
174 
175  protected:
176  virtual void addDisCommandArguments(std::vector<DtCmdLine::Arg*>&,
178  virtual void addHla13CommandArguments(std::vector<DtCmdLine::Arg*>&,
180  virtual void addHla1516CommandArguments(std::vector<DtCmdLine::Arg*>&,
182  virtual void addHla1516eCommandArguments(std::vector<DtCmdLine::Arg*>&,
184 
186 
188  virtual std::vector<std::string> defaultObserverMode() const;
189 
190  protected:
191  std::map<std::string, DtAdditionalCommandsFcn> myAdditionalCommands;
192  std::string myAutoStartDriver;
194  };
195 }
196 
197 #ifndef DtVrfGuiCommandLineParser_INL
198 #include <vrfGuiCore/vrfGuiCommandLineParser.inl>
199 #endif

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)