User:Callahanp: Difference between revisions

Jump to navigation Jump to search
Line 87: Line 87:
|}
|}
====Main/main.cxx====
====Main/main.cxx====
{| class="wikitable"
|-
! Full Text of Call !! Called Function Location or Include File !! Notes
|-
| from bootstrap.cxx <br/> fgMainInit( int argc, char **argv ) || Main/main.cxx || all the arguments from the command line are still there
|-
| sglog().setLogLevels( SG_ALL, SG_INFO )<br>sglog().setStartupLoggingEnabled(true); || /simgear/debug/logstream.cxx || Pretty obvious what this does. || '''What does sglog() actually return?'''
|-
| new FGGlobals; || Main/FGGlobals.cxx || FGGlobals is a bucket for subsystem pointers and properties representing the sim's state.  It's constructor populates the values, including  the locale, the root node of the property tree, the subsystem, event, command and resource managers. It also adds resource providers for Aircraft, he Aircraft Directory and Add-ons. || Question: What is it that makes globals = new FGGlobals a global object.  Here it's a local variable isn't it? Wouldn't it go out of scope in things fgMainInit calls?
|}
====Main/FGGlobals.cxx====


{| class="wikitable"
|-
! Full Text of Call !! Called Function Location or Include File !! Notes
|-
| new '''FGRenderer''' || ||
|-
| new '''SGSubsystemMgr''' || || What makes a component a candidate for inclusion under the subsystem manager?
|-
| new '''SGEventMgr''' || ||
|-
| '''SGCommandMgr'''::instance() || ||
|-
| SGPropertyNode* root = new '''SGPropertyNode'''<br/>  props = SGPropertyNode_ptr(root);|| ||
|-
| locale = new FGLocale(props); || ||
|-
| auto resMgr = simgear::'''ResourceManager'''::instance()|| || ||Review: auto and what does the resource manager do?
|-
| new '''AircraftResourceProvider'''() || ||
|-
| new '''CurrentAircraftDirProvider'''()|| ||
|-
| new flightgear::addons::'''ResourceProvider'''() || ||
|-
| init_properties()||local function || adds property tree nodes for position/, current-view/ and orientation/
|-
|
sim_time_sec( 0.0 )<br/>
fg_root( "" )<br/>
fg_home( "" )<br/>
time_params( NULL )<br/>
channel_options_list( NULL )<br/>
initial_waypoints( NULL )<br/>
channellist( NULL )<br/>
haveUserSettings(false)
| FGGlobals class initializations || things to be set later
|}
====Main/fg_init.cxx====
{{WIP}}
{| class="wikitable"
|-
! Full Text of Call !! Called Function Location or Include File !! Notes
|-
| '''fgInitConfig''' || locally defined ||
* sets up FG_HOME in the property tree, making sure it exists
* sets developer-mode when appropriate
* Read global defaults into globals->get_props() from $FG_ROOT/defaults
|-
| || ||
|-
| || ||
|-
| || ||
|-
| || ||
|}
===== Progress on Cockpit Building =====
===== Progress on Cockpit Building =====


980

edits

Navigation menu