27#include <simgear/compiler.h>
28#include <simgear/props/props.hxx>
29#include <simgear/structure/subsystem_mgr.hxx>
30#include <simgear/misc/sg_path.hxx>
84 SGPropertyNode_ptr props;
90 SGSubsystemMgr *subsystem_mgr;
91 SGEventMgr *event_mgr;
109 SGPath texture_cache_dir;
113 SGPath terrasync_dir;
126 SGSharedPtr<SGMaterialLib> matlib;
128 SGCommandMgr *commands;
142 SGPath catalog_aircraft_dir;
144 bool haveUserSettings;
146 SGPropertyNode_ptr positionLon, positionLat, positionAlt;
147 SGPropertyNode_ptr viewLon, viewLat, viewAlt;
148 SGPropertyNode_ptr orientHeading, orientPitch, orientRoll;
150 SGPropertyNode_ptr referenceOffsetX, referenceOffsetY, referenceOffsetZ;
155 void initProperties();
157 void cleanupListeners();
159 typedef std::vector<SGPropertyChangeListener*> SGPropertyChangeListenerVec;
160 SGPropertyChangeListenerVec _listeners_to_cleanup;
162 SGSharedPtr<simgear::pkg::Root> _packageRoot;
179 return dynamic_cast<T*
>(
get_subsystem(T::staticSubsystemClassId()));
211 SGPath
findDataPath(
const std::string& pathSuffix)
const;
302 inline const std::string &
get_browser ()
const {
return browser; }
345 return channel_options_list;
348 channel_options_list = l;
352 return initial_waypoints;
356 initial_waypoints = list;
Bucket for subsystem pointers representing the sim's state.
flightgear::View * get_current_view() const
void set_catalog_aircraft_path(const SGPath &path)
specify a path we'll prepend to the aircraft paths list if non-empty.
void setPackageRoot(const SGSharedPtr< simgear::pkg::Root > &p)
simgear::pkg::Root * packageRoot()
SGPath resolve_maybe_aircraft_path(const std::string &branch) const
Same as above, but test for non 'Aircraft/' branch paths, and always resolve them against fg_root.
void set_warp_delta(long int d)
void set_time_params(SGTime *t)
void set_channel_options_list(string_list *l)
long int get_warp() const
string_list * get_initial_waypoints()
PathList get_aircraft_paths() const
void set_warp(long int w)
SGVec3d get_view_position_cart() const
void append_aircraft_path(const SGPath &path)
Add an aircraft directory.
void set_renderer(FGRenderer *render)
virtual FGRenderer * get_renderer() const
const SGPath & get_texture_cache_dir() const
SGTime * get_time_params() const
void append_fg_scenery(const SGPath &scenery)
Add a scenery directory.
void set_initial_waypoints(string_list *list)
SGGeod get_aircraft_position() const
void set_matlib(SGMaterialLib *m)
const SGPath & get_download_dir() const
void get_aircraft_orientation(double &heading, double &pitch, double &roll)
PathList get_data_paths() const
Get list of data locations.
void append_aircraft_paths(const PathList &path)
SGEventMgr * get_event_mgr() const
SGPath resolve_aircraft_path(const std::string &branch) const
Given a path to an aircraft-related resource file, resolve it against the appropriate root.
void set_download_dir(const SGPath &path)
FGControls * get_controls() const
SGSubsystemMgr * get_subsystem_mgr() const
void resetPropertyRoot()
reset the property tree to new, empty tree.
SGPropertyNode * get_props()
SGVec3d get_aircraft_position_cart() const
string_list * get_channel_options_list()
void set_fg_home(const SGPath &home)
bool is_headless()
A runtime headless mode for running without a GUI.
SGVec3d get_ownship_reference_position_cart() const
void loadUserSettings(SGPath userDatapath=SGPath())
Load user settings from the autosave file under 'userDataPath', which defaults to $FG_HOME.
const PathList & get_fg_scenery() const
SGGeod get_view_position() const
void append_read_allowed_paths(const SGPath &path)
Allow Nasal to read a path.
SGPath resolve_resource_path(const std::string &branch) const
Search in the following directories:
FGTACANList * get_channellist() const
void append_data_path(const SGPath &path, bool afterFGRoot=false)
FGScenery * get_scenery() const
void addListenerToCleanup(SGPropertyChangeListener *l)
void set_sim_time_sec(double t)
void set_terrasync_dir(const SGPath &path)
const SGPath & get_fg_home() const
SGPath autosaveFilePath(SGPath userDataPath=SGPath()) const
Return an SGPath instance for the autosave file under 'userDataPath', which defaults to $FG_HOME.
double get_sim_time_sec() const
const SGPath & get_fg_root() const
void set_fg_root(const SGPath &root)
void inc_sim_time_sec(double dt)
SGCommandMgr * get_commands()
const std::string & get_browser() const
void saveUserSettings(SGPath userDatapath=SGPath())
Save user settings to the autosave file under 'userDataPath', which defaults to $FG_HOME.
SGMaterialLib * get_matlib() const
T * get_subsystem() const
long int get_warp_delta() const
const PathList & get_extra_read_allowed_paths() const
SGPath findDataPath(const std::string &pathSuffix) const
Given a path suffix (eg 'Textures' or 'AI/Traffic'), find the first data directory which defines it.
void set_browser(const std::string &b)
FGViewMgr * get_viewmgr() const
void set_headless(bool mode)
void set_texture_cache_dir(const SGPath &textureCache)
void set_channellist(FGTACANList *c)
const SGPath & get_terrasync_dir() const
Top level route manager class.
std::vector< SGPath > PathList
std::vector< std::string > string_list
FlightPlan.hxx - defines a full flight-plan object, including departure, cruise, arrival information ...