Jonas Koelker's update to Danish translation, issue 0000150
[supertux.git] / src / console.hpp
index 15d9791..83ea2fe 100644 (file)
@@ -61,9 +61,6 @@ public:
   void toggle(); /**< display the console if hidden, hide otherwise */
 
   bool hasFocus(); /**< true if characters should be sent to the console instead of their normal target */
-  void registerCommand(std::string command, ConsoleCommandReceiver* ccr); /**< associate command with the given CCR */
-  void unregisterCommand(std::string command, ConsoleCommandReceiver* ccr); /**< dissociate command and CCR */
-  void unregisterCommands(ConsoleCommandReceiver* ccr); /**< dissociate all commands of given CCR */
 
   template<typename T> static bool string_is(std::string s) {
     std::istringstream iss(s);
@@ -89,7 +86,6 @@ private:
   std::list<std::string> history; /**< command history. New lines get added to back. */
   std::list<std::string>::iterator history_position; /**< item of command history that is currently displayed */
   std::list<std::string> lines; /**< backbuffer of lines sent to the console. New lines get added to front. */
-  std::map<std::string, std::list<ConsoleCommandReceiver*> > commands; /**< map of console commands and a list of associated ConsoleCommandReceivers */
 
   std::auto_ptr<Surface> background; /**< console background image */
   std::auto_ptr<Surface> background2; /**< second, moving console background image */
@@ -138,19 +134,4 @@ class ConsoleStreamBuffer : public std::stringbuf
     }
 };
 
-class ConsoleCommandReceiver
-{
-public:
-  virtual ~ConsoleCommandReceiver()
-  {
-    Console::instance->unregisterCommands(this);
-  }
-
-  /**
-   * callback from Console; return false if command was unknown,
-   * true otherwise
-   */
-  virtual bool consoleCommand(std::string command, std::vector<std::string> arguments) = 0;
-};
-
 #endif