#include <string>
#include <map>
-#include <simgear/threads/SGThread.hxx>
#include <simgear/math/sg_types.hxx>
// forward decls
}
public:
-
+ /**
+ * Default constructor (sets instance to created item)
+ */
+ SGCommandMgr ();
/**
- * Destructor.
+ * Destructor. (sets instance to NULL)
*/
virtual ~SGCommandMgr ();
- /**
- * Implement the classical singleton.
- */
static SGCommandMgr* instance();
/**
*/
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:
typedef std::map<std::string,Command*> command_map;
command_map _commands;
- static SGMutex _instanceMutex;
-
};
#endif // __COMMANDS_HXX