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"
return (0);
}
-void SampleHistogram::printBuckets (ostream & s)
+void SampleHistogram::printBuckets (std::ostream & s)
{
for (int i = 0; i < howManyBuckets; i++)
{
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>
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>
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:
#include "subsystem_mgr.hxx"
#include <simgear/math/SGMath.hxx>
-
+#include "SGSmplstat.hxx"
const int SG_MAX_SUBSYSTEM_EXCEPTIONS = 4;\f
////////////////////////////////////////////////////////////////////////
// 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)
+
// Written by David Megginson, started 2000-12
//
// Copyright (C) 2000 David Megginson, david@megginson.com
#include <simgear/timing/timestamp.hxx>
#include <simgear/structure/SGSharedPtr.hxx>
-#include "SGSmplstat.hxx"
class TimingInfo
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;