#include <simgear/compiler.h>
-#if 0
-#ifdef HAVE_WINDOWS_H
-# include <windows.h>
-# include <float.h>
-#endif
-
-#include STL_STRING
-SG_USING_STD(string);
-
-#include <vector>
-SG_USING_STD(vector);
-#endif
-
#include <string>
#include <map>
#include <vector>
-SG_USING_STD(map);
-SG_USING_STD(vector);
-SG_USING_STD(string);
+
+using std::map;
+using std::vector;
+using std::string;
#include <simgear/props/props.hxx>
#include <simgear/timing/timestamp.hxx>
SGTimeStamp time;
public:
- TimingInfo(string name, SGTimeStamp &t) { eventName = name; time = t;};
- string getName() { return eventName; };
- SGTimeStamp getTime() { return time; };
+ TimingInfo(const string& name, const SGTimeStamp &t) :
+ eventName(name), time(t)
+ { }
+ const string& getName() const { return eventName; }
+ const SGTimeStamp& getTime() const { return time; }
};
typedef vector<TimingInfo> eventTimeVec;
* subsystems may also override the suspend() and resume() methods to
* take different actions.</p>
*/
-class SGSubsystem
+class SGSubsystem : public SGReferenced
{
public:
* Place time stamps at strategic points in the execution of subsystems
* update() member functions. Predominantly for debugging purposes.
*/
- void stamp(string name);
+ void stamp(const string& name);
private:
- struct Member {
+ class Member {
- Member ();
+ private:
Member (const Member &member);
+ public:
+ Member ();
virtual ~Member ();
virtual void update (double delta_time_sec);