]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropertyManager.h
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGPropertyManager.h
index a492a9df3d43ba692fa12ee150937bd55257a60b..e257e9bc4bf42616bfcbbbb9b01def120a726b12 100644 (file)
@@ -1,29 +1,29 @@
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
  Header:       FGPropertyManager.h
  Author:       Tony Peden
                Based on work originally by David Megginson
  Date:         2/2002
+
  ------------- Copyright (C) 2002 -------------
+
  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.
+
  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.
+
  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  Place - Suite 330, Boston, MA  02111-1307, USA.
 
  Further information about the GNU General Public License can also be found on
  the world wide web at http://www.gnu.org.
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -36,7 +36,11 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include <string>
+#ifdef FGFS
 #include <simgear/props/props.hxx>
+#else
+#include "simgear/props/props.hxx"
+#endif
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
@@ -53,21 +57,13 @@ using namespace std;
 namespace JSBSim {
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 /** Class wrapper for property handling.
     @author David Megginson, Tony Peden
-    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGPropertyManager.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
-         Header File </a>
-    @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGPropertyManager.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
-         Source File </a>
   */
-  
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -77,17 +73,17 @@ class FGPropertyManager : public SGPropertyNode {
     /// Constructor
     FGPropertyManager(void) {}
     /// Destructor
-    ~FGPropertyManager(void) {}   
-    
+    ~FGPropertyManager(void) {}
+
     /** Property-ify a name
      *  replaces spaces with '-' and, optionally, makes name all lower case
      *  @param name string to change
      *  @param lowercase true to change all upper case chars to lower
      *  NOTE: this function changes its argument and thus relies
      *  on pass by value
-     */ 
+     */
     string mkPropertyName(string name, bool lowercase);
-    
+
     /**
      * Get a property node.
      *
@@ -95,10 +91,10 @@ class FGPropertyManager : public SGPropertyNode {
      * @param create true to create the node if it doesn't exist.
      * @return The node, or 0 if none exists and none was created.
      */
-    FGPropertyManager* 
+    FGPropertyManager*
     GetNode (const string &path, bool create = false);
-  
-    FGPropertyManager* 
+
+    FGPropertyManager*
     GetNode (const string &relpath, int index, bool create = false);
 
     /**
@@ -113,7 +109,7 @@ class FGPropertyManager : public SGPropertyNode {
      * Get the name of a node
      */
     string GetName( void );
-    
+
     /**
      * Get the fully qualified name of a node
      * This function is very slow, so is probably useful for debugging only.
@@ -382,7 +378,7 @@ class FGPropertyManager : public SGPropertyNode {
     void Untie (const string &name);
 
 
-                                   // Templates cause ambiguity here
+        // Templates cause ambiguity here
 
     /**
      * Tie a property to an external bool variable.
@@ -463,25 +459,25 @@ class FGPropertyManager : public SGPropertyNode {
     Tie (const string &name, double *pointer, bool useDefault = true);
 
 //============================================================================
-//  
-//  All of the following functions *must* be inlined, otherwise linker 
+//
+//  All of the following functions *must* be inlined, otherwise linker
 //  errors will result
 //
 //============================================================================
-   
+
     /* template <class V> void
     Tie (const string &name, V (*getter)(), void (*setter)(V) = 0,
            bool useDefault = true);
-    
+
     template <class V> void
     Tie (const string &name, int index, V (*getter)(int),
            void (*setter)(int, V) = 0, bool useDefault = true);
-    
+
     template <class T, class V> void
     Tie (const string &name, T * obj, V (T::*getter)() const,
            void (T::*setter)(V) = 0, bool useDefault = true);
 
-    template <class T, class V> void 
+    template <class T, class V> void
     Tie (const string &name, T * obj, int index,
            V (T::*getter)(int) const, void (T::*setter)(int, V) = 0,
            bool useDefault = true); */
@@ -498,19 +494,21 @@ class FGPropertyManager : public SGPropertyNode {
      * @param name The property name to tie (full path).
      * @param getter The getter function, or 0 if the value is unreadable.
      * @param setter The setter function, or 0 if the value is unmodifiable.
-     * @param useDefault true if the setter should be invoked with any existing 
+     * @param useDefault true if the setter should be invoked with any existing
      *        property value should be; false if the old value should be
      *        discarded; defaults to true.
      */
-    
-    template <class V> inline void 
+
+    template <class V> inline void
     Tie (const string &name, V (*getter)(), void (*setter)(V) = 0,
                                               bool useDefault = true)
     {
       if (!tie(name.c_str(), SGRawValueFunctions<V>(getter, setter),
-                                    useDefault))
+         useDefault))
+      {
         cout <<
-              "Failed to tie property " << name << " to functions" << endl;
+         "Failed to tie property " << name << " to functions" << endl;
+      }
     }
 
 
@@ -528,21 +526,20 @@ class FGPropertyManager : public SGPropertyNode {
      *        setter functions.
      * @param getter The getter function, or 0 if the value is unreadable.
      * @param setter The setter function, or 0 if the value is unmodifiable.
-     * @param useDefault true if the setter should be invoked with any existing 
+     * @param useDefault true if the setter should be invoked with any existing
      *        property value should be; false if the old value should be
      *        discarded; defaults to true.
      */
-    template <class V> inline void Tie (const string &name, 
+    template <class V> inline void Tie (const string &name,
                                         int index, V (*getter)(int),
            void (*setter)(int, V) = 0, bool useDefault = true)
     {
       if (!tie(name.c_str(),
-                                    SGRawValueFunctionsIndexed<V>(index,
-                                                                  getter,
-                                                                  setter),
-                                    useDefault))
+           SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault))
+      {
         cout <<
-              "Failed to tie property " << name << " to indexed functions" << endl;
+         "Failed to tie property " << name << " to indexed functions" << endl;
+      }
     }
 
 
@@ -561,7 +558,7 @@ class FGPropertyManager : public SGPropertyNode {
      *        unreadable.
      * @param setter The object's setter method, or 0 if the value is
      *        unmodifiable.
-     * @param useDefault true if the setter should be invoked with any existing 
+     * @param useDefault true if the setter should be invoked with any existing
      *        property value should be; false if the old value should be
      *        discarded; defaults to true.
      */
@@ -570,12 +567,13 @@ class FGPropertyManager : public SGPropertyNode {
            void (T::*setter)(V) = 0, bool useDefault = true)
     {
       if (!tie(name.c_str(),
-                                SGRawValueMethods<T,V>(*obj, getter, setter),
-                                useDefault))
+             SGRawValueMethods<T,V>(*obj, getter, setter), useDefault))
+      {
         cout <<
-          "Failed to tie property " << name << " to object methods" << endl;
+         "Failed to tie property " << name << " to object methods" << endl;
+      }
     }
-    
+
     /**
      * Tie a property to a pair of indexed object methods.
      *
@@ -591,25 +589,23 @@ class FGPropertyManager : public SGPropertyNode {
      *        setter methods.
      * @param getter The getter method, or 0 if the value is unreadable.
      * @param setter The setter method, or 0 if the value is unmodifiable.
-     * @param useDefault true if the setter should be invoked with any existing 
+     * @param useDefault true if the setter should be invoked with any existing
      *        property value should be; false if the old value should be
      *        discarded; defaults to true.
      */
-    template <class T, class V> inline void 
+    template <class T, class V> inline void
     Tie (const string &name, T * obj, int index,
            V (T::*getter)(int) const, void (T::*setter)(int, V) = 0,
                                               bool useDefault = true)
     {
       if (!tie(name.c_str(),
-                                SGRawValueMethodsIndexed<T,V>(*obj,
-                                                              index,
-                                                              getter,
-                                                              setter),
-                                useDefault))
+          SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault))
+      {
         cout <<
-          "Failed to tie property " << name << " to indexed object methods" << endl;
+         "Failed to tie property " << name << " to indexed object methods" << endl;
+      }
    }
-};                                                                                       
+};
 }
 #endif // FGPROPERTYMANAGER_H