]> git.mxchange.org Git - simgear.git/commitdiff
std:: namespace fixes, and sink some code from the subsystem header into the implemen...
authorJames Turner <zakalawe@mac.com>
Sun, 13 Nov 2011 20:34:39 +0000 (20:34 +0000)
committerJames Turner <zakalawe@mac.com>
Sun, 13 Nov 2011 20:34:39 +0000 (20:34 +0000)
simgear/structure/SGSmplhist.cxx
simgear/structure/SGSmplhist.hxx
simgear/structure/SGSmplstat.cxx
simgear/structure/SGSmplstat.hxx
simgear/structure/subsystem_mgr.cxx
simgear/structure/subsystem_mgr.hxx

index 73b3f5532e1f903aec9d96df738e800d52496b59..760704b384d52d78d7d36b0c7389bc6a1e8d251a 100644 (file)
@@ -15,9 +15,11 @@ You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
-#ifdef __GNUG__
-#pragma implementation
+
+#ifdef HAVE_CONFIG_H
+#include <simgear_config.h>
 #endif
+
 #include <iostream>
 #include <fstream>
 #include "SGSmplhist.hxx"
@@ -94,7 +96,7 @@ int SampleHistogram::similarSamples (double d)
   return (0);
 }
 
-void SampleHistogram::printBuckets (ostream & s)
+void SampleHistogram::printBuckets (std::ostream & s)
 {
   for (int i = 0; i < howManyBuckets; i++)
     {
index 36ddc502c8b83360fa7861c2fc1e7c31b3fd9353..67a9928c4102fe7a82e332a290963c3695a86929 100644 (file)
@@ -16,13 +16,7 @@ License along with this library; if not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
-#ifdef HAVE_CONFIG_H
-#include <simgear_config.h>
-#endif
 #ifndef SampleHistogram_h
-#ifdef __GNUG__
-#pragma interface
-#endif
 #define SampleHistogram_h 1
 
 #include <iosfwd>
index 6c1afde77c5504257c961d3bcb04035011f36672..6d071be92b189d452bc756c49c477b32b6db76ec 100644 (file)
@@ -15,9 +15,6 @@ You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include <math.h>
 
index 1d1e8d57e1c498bc6c9444134b5e86c3b0301b96..d815f400a0101726985f132200ffb5d83606fd13 100644 (file)
@@ -16,17 +16,13 @@ License along with this library; if not, write to the Free Software
 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 #ifndef SampleStatistic_h
-#ifdef __GNUG__
-#pragma interface
-#endif
+
 #define SampleStatistic_h 1
 
 
 #undef min
 #undef max
 
-using namespace std;
-
 class SampleStatistic
 {
 protected:
index a59d6ef086f9ac4291c878187c38e14deede6f85..8265f9b38cc1ad58a8d90a50c66d4c1579dd41a3 100644 (file)
@@ -29,7 +29,7 @@
 #include "subsystem_mgr.hxx"
 
 #include <simgear/math/SGMath.hxx>
-
+#include "SGSmplstat.hxx"
 
 const int SG_MAX_SUBSYSTEM_EXCEPTIONS = 4;\f
 ////////////////////////////////////////////////////////////////////////
@@ -132,6 +132,32 @@ void SGSubsystem::stamp(const string& name)
 // Implementation of SGSubsystemGroup.
 ////////////////////////////////////////////////////////////////////////
 
+class SGSubsystemGroup::Member
+{    
+private:
+    Member (const Member &member);
+public:
+    Member ();
+    virtual ~Member ();
+    
+    virtual void update (double delta_time_sec);
+    void printTimingInformation(double time);
+    void printTimingStatistics(double minMaxTime=0.0,double minJitter=0.0);
+    void updateExecutionTime(double time);
+    double getTimeWarningThreshold();
+    void collectDebugTiming (bool collect) { collectTimeStats = collect; };
+    
+    SampleStatistic timeStat;
+    std::string name;
+    SGSubsystem * subsystem;
+    double min_step_sec;
+    double elapsed_sec;
+    bool collectTimeStats;
+    int exceptionCount;
+};
+
+
+
 SGSubsystemGroup::SGSubsystemGroup () :
   _fixedUpdateTime(-1.0),
   _updateTimeRemainder(0.0)
index 60313fd4a3543a8f723f233dc66c660a0ecd2951..f1e2ad9af5e1ef0a0df572ba1aa30e28f22a35d9 100644 (file)
@@ -1,3 +1,4 @@
+
 // Written by David Megginson, started 2000-12
 //
 // Copyright (C) 2000  David Megginson, david@megginson.com
@@ -31,7 +32,6 @@
 
 #include <simgear/timing/timestamp.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
-#include "SGSmplstat.hxx"
 
 
 class TimingInfo
@@ -331,31 +331,8 @@ public:
     void set_fixed_update_time(double fixed_dt);
 private:
 
-    class Member {
-
-    private:
-        Member (const Member &member);
-    public:
-        Member ();
-        virtual ~Member ();
-
-        virtual void update (double delta_time_sec);
-        void printTimingInformation(double time);
-        void printTimingStatistics(double minMaxTime=0.0,double minJitter=0.0);
-        void updateExecutionTime(double time);
-        double getTimeWarningThreshold();
-        void collectDebugTiming (bool collect) { collectTimeStats = collect; };
-
-        SampleStatistic timeStat;
-        std::string name;
-        SGSubsystem * subsystem;
-        double min_step_sec;
-        double elapsed_sec;
-        bool collectTimeStats;
-        int exceptionCount;
-    };
-
-    Member * get_member (const std::string &name, bool create = false);
+    class Member;
+    Member* get_member (const std::string &name, bool create = false);
 
     std::vector<Member *> _members;