namespace flightgear
{
-
+
+/// option processing can have various result values
+/// depending on what the user requested. Note processOptions only
+/// returns a subset of these.
+enum OptionResult
+{
+ FG_OPTIONS_OK = 0,
+ FG_OPTIONS_HELP = 1,
+ FG_OPTIONS_ERROR = 2,
+ FG_OPTIONS_EXIT = 3,
+ FG_OPTIONS_VERBOSE_HELP = 4,
+ FG_OPTIONS_SHOW_AIRCRAFT = 5,
+ FG_OPTIONS_SHOW_SOUND_DEVICES = 6,
+ FG_OPTIONS_NO_DEFAULT_CONFIG = 7
+};
+
class Options
{
private:
/**
* apply option values to the simulation state
- * (set properties, etc)
+ * (set properties, etc).
*/
- void processOptions();
+ OptionResult processOptions();
/**
* init the aircraft options
*/
void initAircraft();
+
+ /**
+ * should defualt configuration files be loaded and processed or not?
+ * There's many configuration files we have historically read by default
+ * on startup - preferences.xml, fgfs.rc in various places and so on.
+ * --no-default-config allows this behaviour to be changed, so only
+ * expicitly listed files are read - this is useful for testing. Expose
+ * the value of the option here.
+ */
+ bool shouldLoadDefaultConfig() const;
private:
void showUsage() const;
} // of namespace flightgear
+void fgSetDefaults();
+
#endif /* _OPTIONS_HXX */