]> git.mxchange.org Git - simgear.git/blobdiff - simgear/structure/commands.hxx
Some Linux platforms need <cstdio> for snprintf.
[simgear.git] / simgear / structure / commands.hxx
index 699cd055ded50e3b9df394abf4116cf488ff8920..2ffabf0ac12370b535eb9c65f3675fe24b66bdad 100644 (file)
@@ -16,7 +16,6 @@
 #include <string>
 #include <map>
 
-#include <simgear/threads/SGThread.hxx>
 #include <simgear/math/sg_types.hxx>
 
 // forward decls
@@ -87,16 +86,16 @@ private:
    }
    
 public:
-
+   /**
+    * Default constructor (sets instance to created item)
+    */
+   SGCommandMgr ();
 
   /**
-   * Destructor.
+   * Destructor. (sets instance to NULL)
    */
   virtual ~SGCommandMgr ();
 
-  /**
-   * Implement the classical singleton.
-   */
   static SGCommandMgr* instance();
 
   /**
@@ -150,11 +149,12 @@ public:
    */
   virtual bool execute (const std::string &name, const SGPropertyNode * arg) const;
 
-protected:
   /**
-   * Default constructor.
+   * Remove a command registration
    */
-  SGCommandMgr ();
+  bool removeCommand(const std::string& name);
+protected:
+
 
 
 private:
@@ -162,8 +162,6 @@ private:
   typedef std::map<std::string,Command*> command_map;
   command_map _commands;
 
-  static SGMutex _instanceMutex;
-
 };
 
 #endif // __COMMANDS_HXX