]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.hxx
- /sim/model/h-rotation renamed to /sim/model/heading-offset-deg
[flightgear.git] / src / Main / fg_props.hxx
index 9e794d384ce4738b064f9fdd339af11261e9af5f..2eae51b8fd27d7813726270d8825518ea02035c6 100644 (file)
@@ -7,9 +7,11 @@
 
 \f
 ////////////////////////////////////////////////////////////////////////
-// Loading and saving properties.
+// Property management.
 ////////////////////////////////////////////////////////////////////////
 
+extern void fgInitProps ();    // fixme: how are they untied?
+extern void fgUpdateProps ();
 extern bool fgSaveFlight (ostream &output);
 extern bool fgLoadFlight (istream &input);
 
@@ -25,6 +27,7 @@ extern bool fgLoadFlight (istream &input);
  *
  * @param path The path of the node, relative to root.
  * @param create true to create the node if it doesn't exist.
+ * @return The node, or 0 if none exists and none was created.
  */
 inline SGPropertyNode * 
 fgGetNode (const string &path, bool create = false)
@@ -34,21 +37,17 @@ fgGetNode (const string &path, bool create = false)
 
 
 /**
- * Get an SGValue pointer that can be queried repeatedly.
+ * Test whether a given node exists.
  *
- * If the property value is going to be accessed within the loop,
- * it is best to use this method for maximum efficiency.
+ * @param path The path of the node, relative to root.
+ * @return true if the node exists, false otherwise.
  */
-inline SGValue * 
-fgGetValue (const string &name, bool create = false)
+inline bool
+fgHasNode (const string &path)
 {
-  return globals->get_props()->getValue(name, create);
+  return (fgGetNode(path, false) != 0);
 }
 
-inline bool fgHasValue (const string &name)
-{
-  return globals->get_props()->hasValue(name);
-}
 
 inline bool fgGetBool (const string &name, bool defaultValue = false)
 {