]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/subsystem_mgr.hxx
Make use of posix clocks if available.
[simgear.git] / simgear / structure / subsystem_mgr.hxx
index e763351459f7107935f12777937840ad704b1d88..a751d30699426c14561447c1acbd741e78421384 100644 (file)
 #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>
@@ -44,9 +45,11 @@ private:
     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;
@@ -270,7 +273,7 @@ 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);
   
 
 
@@ -316,10 +319,12 @@ public:
 
 private:
 
-    struct Member {
+    class Member {
 
-        Member ();
+    private:
         Member (const Member &member);
+    public:
+        Member ();
         virtual ~Member ();
 
         virtual void update (double delta_time_sec);