[Orxonox-commit 5687] r10347 - in code/branches/core7: src/libraries/core src/libraries/core/command src/libraries/core/config src/libraries/core/input src/libraries/network src/libraries/tools src/modules/designtools src/modules/docking src/modules/mini4dgame src/modules/objects/triggers src/modules/overlays/hud src/modules/towerdefense src/orxonox src/orxonox/chat src/orxonox/controllers src/orxonox/gamestates src/orxonox/gametypes src/orxonox/overlays src/orxonox/sound src/orxonox/worldentities/pawns test/core/command

landauf at orxonox.net landauf at orxonox.net
Mon Apr 6 15:47:42 CEST 2015


Author: landauf
Date: 2015-04-06 15:47:42 +0200 (Mon, 06 Apr 2015)
New Revision: 10347

Added:
   code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
Modified:
   code/branches/core7/src/libraries/core/Core.cc
   code/branches/core7/src/libraries/core/GUIManager.cc
   code/branches/core7/src/libraries/core/Game.cc
   code/branches/core7/src/libraries/core/GraphicsManager.cc
   code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc
   code/branches/core7/src/libraries/core/command/CommandEvaluation.cc
   code/branches/core7/src/libraries/core/command/CommandExecutor.cc
   code/branches/core7/src/libraries/core/command/ConsoleCommand.cc
   code/branches/core7/src/libraries/core/command/ConsoleCommand.h
   code/branches/core7/src/libraries/core/command/ConsoleCommandCompilation.cc
   code/branches/core7/src/libraries/core/command/IRC.cc
   code/branches/core7/src/libraries/core/command/TclBind.cc
   code/branches/core7/src/libraries/core/command/TclThreadManager.cc
   code/branches/core7/src/libraries/core/config/SettingsConfigFile.cc
   code/branches/core7/src/libraries/core/input/InputManager.cc
   code/branches/core7/src/libraries/core/input/KeyBinderManager.cc
   code/branches/core7/src/libraries/core/input/KeyDetector.cc
   code/branches/core7/src/libraries/core/input/Mouse.cc
   code/branches/core7/src/libraries/network/Host.cc
   code/branches/core7/src/libraries/network/MasterServer.cc
   code/branches/core7/src/libraries/tools/Timer.cc
   code/branches/core7/src/modules/designtools/ScreenshotManager.cc
   code/branches/core7/src/modules/designtools/SkyboxGenerator.cc
   code/branches/core7/src/modules/docking/Dock.cc
   code/branches/core7/src/modules/mini4dgame/Mini4Dgame.cc
   code/branches/core7/src/modules/objects/triggers/Trigger.cc
   code/branches/core7/src/modules/overlays/hud/HUDNavigation.cc
   code/branches/core7/src/modules/towerdefense/TowerDefense.cc
   code/branches/core7/src/orxonox/Scene.cc
   code/branches/core7/src/orxonox/Test.cc
   code/branches/core7/src/orxonox/chat/ChatInputHandler.cc
   code/branches/core7/src/orxonox/chat/ChatManager.cc
   code/branches/core7/src/orxonox/controllers/ArtificialController.cc
   code/branches/core7/src/orxonox/controllers/FormationController.cc
   code/branches/core7/src/orxonox/controllers/HumanController.cc
   code/branches/core7/src/orxonox/controllers/NewHumanController.cc
   code/branches/core7/src/orxonox/gamestates/GSLevel.cc
   code/branches/core7/src/orxonox/gamestates/GSMainMenu.cc
   code/branches/core7/src/orxonox/gamestates/GSRoot.cc
   code/branches/core7/src/orxonox/gametypes/Gametype.cc
   code/branches/core7/src/orxonox/gametypes/Mission.cc
   code/branches/core7/src/orxonox/overlays/InGameConsole.cc
   code/branches/core7/src/orxonox/overlays/OrxonoxOverlay.cc
   code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
   code/branches/core7/src/orxonox/sound/WorldAmbientSound.cc
   code/branches/core7/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
   code/branches/core7/src/orxonox/worldentities/pawns/Spectator.cc
   code/branches/core7/test/core/command/CommandTest.cc
Log:
moved console command macros to a new file (ConsoleCommandIncludes.h)

Modified: code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- code/branches/core7/src/libraries/core/Core.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/Core.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -70,7 +70,7 @@
 #include "class/Identifier.h"
 #include "Language.h"
 #include "LuaState.h"
-#include "command/ConsoleCommand.h"
+#include "command/ConsoleCommandManager.h"
 #include "command/IOConsole.h"
 #include "command/TclBind.h"
 #include "command/TclThreadManager.h"

Modified: code/branches/core7/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/GUIManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/GUIManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -107,7 +107,7 @@
 #include "LuaState.h"
 #include "PathConfig.h"
 #include "Resource.h"
-#include "command/ConsoleCommand.h"
+#include "command/ConsoleCommandIncludes.h"
 #include "input/InputManager.h"
 #include "input/InputState.h"
 #include "input/KeyBinderManager.h"

Modified: code/branches/core7/src/libraries/core/Game.cc
===================================================================
--- code/branches/core7/src/libraries/core/Game.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/Game.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -51,7 +51,7 @@
 #include "GameState.h"
 #include "GraphicsManager.h"
 #include "GUIManager.h"
-#include "command/ConsoleCommand.h"
+#include "command/ConsoleCommandIncludes.h"
 
 namespace orxonox
 {

Modified: code/branches/core7/src/libraries/core/GraphicsManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/GraphicsManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/GraphicsManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -62,7 +62,7 @@
 #include "ViewportEventListener.h"
 #include "WindowEventListener.h"
 #include "XMLFile.h"
-#include "command/ConsoleCommand.h"
+#include "command/ConsoleCommandIncludes.h"
 #include "input/InputManager.h"
 
 namespace orxonox

Modified: code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/ArgumentCompletionFunctions.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -43,6 +43,7 @@
 #include "core/config/ConfigValueContainer.h"
 #include "CommandExecutor.h"
 #include "ConsoleCommand.h"
+#include "ConsoleCommandManager.h"
 #include "TclThreadManager.h"
 
 // Differentiate Boost Filesystem v2 and v3

Modified: code/branches/core7/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/CommandEvaluation.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/CommandEvaluation.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -36,6 +36,7 @@
 #include "util/StringUtils.h"
 #include "CommandExecutor.h"
 #include "ConsoleCommand.h"
+#include "ConsoleCommandManager.h"
 
 namespace orxonox
 {

Modified: code/branches/core7/src/libraries/core/command/CommandExecutor.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/CommandExecutor.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/CommandExecutor.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -33,7 +33,7 @@
 
 #include "CommandExecutor.h"
 
-#include "ConsoleCommand.h"
+#include "ConsoleCommandIncludes.h"
 #include "TclBind.h"
 #include "Shell.h"
 

Modified: code/branches/core7/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/ConsoleCommand.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/ConsoleCommand.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -38,6 +38,7 @@
 #include "core/GameMode.h"
 #include "core/input/KeyBinder.h"
 #include "core/input/KeyBinderManager.h"
+#include "ConsoleCommandManager.h"
 
 namespace orxonox
 {

Modified: code/branches/core7/src/libraries/core/command/ConsoleCommand.h
===================================================================
--- code/branches/core7/src/libraries/core/command/ConsoleCommand.h	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/ConsoleCommand.h	2015-04-06 13:47:42 UTC (rev 10347)
@@ -27,191 +27,9 @@
  */
 
 /**
-    @defgroup ConsoleCommand Console commands
-    @ingroup Command
-*/
-
-/**
     @file
     @ingroup Command ConsoleCommand
-    @brief Declaration of the orxonox::ConsoleCommand class and the SetConsoleCommand() macro.
-
-    @anchor ConsoleCommandExample
-
-    Console commands can be used to write scripts, use key-bindings or simply to be
-    entered into the shell by the user. Instances of orxonox::ConsoleCommand define
-    the function of a command, and also more information like, for example, if it is
-    active, default values, and possible arguments.
-
-    Commands need to be registered to the system statically on startup by using the
-    SetConsoleCommand() or DeclareConsoleCommand() macros outside of a function.
-    This ensures that commands are known to the system at any time, so they can be
-    evaluated (see orxonox::CommandExecutor::evaluate()), for example for key-bindings.
-
-    Example:
-    @code
-    void myCoutFunction(const std::string& text)        // Define a static function
-    {
-        orxout() << "Text: " << text << endl;           // Print the text to the console
-    }
-
-    SetConsoleCommand("cout", &myCoutFunction);         // Register the function as command with name "cout"
-    @endcode
-
-    Now you can open the shell and execute the command:
-    @code
-    $ cout Hello World
-    @endcode
-
-    Internally this command is now passed to orxonox::CommandExecutor::execute():
-    @code
-    CommandExecutor::execute("cout HelloWorld");
-    @endcode
-
-    CommandExecutor searches for a command with name "cout" and passes the arguments
-    "Hello World" to it. Because we registered myCoutFunction() with this command,
-    as a result the following text will be printed to the console:
-    @code
-    Text: Hello World
-    @endcode
-
-    You can add more attributes to the ConsoleCommand, by using the command-chain feature
-    of SetConsoleCommand(). For example like this:
-    @code
-    SetConsoleCommand("cout", &myCoutFunction)
-        .addGroup("output", "text")
-        .accessLevel(AccessLevel::Offline)
-        .defaultValues("no text");
-    @endcode
-
-    Open the shell again and try it:
-    @code
-    $ cout Hello World
-    Text: Hello World
-    $ output text Hello World
-    Text: Hello World
-    $ cout
-    Text: no text
-    @endcode
-
-    If you execute it online (note: the access level is "Offline"), you will see the
-    following (or something similar):
-    @code
-    $ cout Hello World
-    Error: Can't execute command "cout", access denied.
-    @endcode
-
-    If a command is executed, the arguments are passed to an underlying function,
-    whitch is wrapped by an orxonox::Functor which again is wrapped by an orxonox::Executor.
-    The Functor contains the function-pointer, as well as the object-pointer in
-    case of a non-static member-function. The executor stores possible default-values
-    for each argument of the function.
-
-    The function of a command can be changed at any time. It's possible to just exchange
-    the function-pointer of the underlying Functor if the headers of the functions are
-    exactly the same. But you can also exchange the Functor itself or even completely
-    replace the Executor. Also the other attributes of a ConsoleCommand can be modified
-    during the game, for example it can be activated or deactivated.
-
-    To do so, the function ModifyConsoleCommand() has to be used. It returns an instance
-    of orxonox::ConsoleCommand::ConsoleCommandManipulator which has an interface similar to
-    orxonox::ConsoleCommand, but with slight differences. You can use it the same way like
-    SetConsoleCommand(), meaning you can use command-chains to change different attributes at
-    the same time. ModifyConsoleCommand() must not be executed statically, but rather in a
-    function at some point of the execution of the program.
-
-    Example:
-    @code
-    void myOtherCoutFunction(const std::string& text)                       // Define a new static function
-    {
-        orxout() << "Uppercase: " << getUppercase(text) << endl;            // Print the text in uppercase to the console
-    }
-
-    {
-        // ...                                                              // somewhere in the code
-
-        ModifyConsoleCommand("cout").setFunction(&myOtherCoutFunction);     // Modify the underlying function of the command
-
-        // ...
-    }
-    @endcode
-
-    If you now enter the command into the shell, you'll see a different behavior:
-    @code
-    $ cout Hello World
-    Uppercase: HELLO WORLD
-    $ cout
-    Uppercase: NO TEXT
-    @endcode
-
-    A few important notes about changing functions:
-
-    Instead of changing the function with setFunction(), you can also create a command-stack
-    by using pushFunction() and popFunction(). It's important to note a few things about that,
-    because the underlying structure of Executor and Functor has a few pitfalls:
-     - If you push a new function-pointer, the same executor as before will be used (and, if
-       the headers match, even the same functor can be used, which is very fast)
-     - If you push a new Functor, the same executor as before will be used
-     - If you push a new Executor, everything is changed
-
-    Note that the executor contains the @b default @b values, so if you just exchange the
-    Functor, the default values remain the same. However if you decide to change the default
-    values at any point of the stack, <b>this will also change the default values on all
-    other stack-levels</b> that share the same executor. If you don't like this behavior,
-    you have to explicitly push a new executor before changing the default values, either by
-    calling pushFunction(executor) or by calling pushFunction(void) which pushes a copy of
-    the current executor to the stack.
-
-    Another important point are object pointers in case of non-static member-functions.
-    Whenever you set or push a new function, <b>you must add the object pointer again</b>
-    because objects are stored in the Functor which is usually exchanged if you change
-    the function.
-
-    You can also use a stack for objects, but note that this <b>object-stack is different for each
-    function</b> - so if you set a new function, the object-stack will be cleared. If you push
-    a new function, the old object-stack is stored in the stack, so it can be restored if
-    you pop the function.
-
-    %DeclareConsoleCommand():
-
-    Appart from SetConsoleCommand() you can also call DeclareConsoleCommand(). In contrast
-    to SetConsoleCommand(), this doesn't assign a function to the command. Indeed you have
-    to pass a function-pointer to DeclareConsoleCommand(), but it is only used to determine
-    the header of the future command-function. This allows to declare a command statically,
-    thus it's possible to evaluate key-bindings of this command, but the actual function
-    can be assigned at a later point.
-
-    Example:
-    @code
-    DeclareConsoleCommand("cout", &prototype::void__string);
-    @endcode
-
-    If you try to execute the command now, you see the following (or something similar):
-    @code
-    $ cout Hello World
-    Error: Can't execute command "cout", command is not active.
-    @endcode
-
-    You first have to assign a function to use the command:
-    @code
-    {
-        // ...
-
-        ModifyConsoleCommand("cout").setFunction(&myCoutFunction);
-
-        // ...
-    }
-    @endcode
-
-    Now you can use it:
-    @code
-    $ cout Hello World
-    Text: Hello World
-    @endcode
-
-    Note that the initial function prototype::void__string is defined in the namespace
-    orxonox::prototype. If there's no function with the desired header, you can extend
-    the collection of functions or simply use another function that has the same header.
+    @brief Declaration of the orxonox::ConsoleCommand class.
 */
 
 #ifndef _ConsoleCommand_H__
@@ -222,89 +40,9 @@
 #include <stack>
 #include <vector>
 
-#include "util/VA_NARGS.h"
 #include "ArgumentCompletionFunctions.h"
 #include "Executor.h"
-#include "ConsoleCommandManager.h"
 
-
-/**
-    @brief Defines a console command. The macro is overloaded for 2-4 parameters.
-
-    This is an overloaded macro. Depending on the number of arguments a different
-    overloaded implementation of the macro will be chosen.
-
-    Console commands created with SetConsoleCommand() become active immediately and
-    the given function-pointer (and optionally the object) will be used to execute
-    the command.
-*/
-#define SetConsoleCommand(...) \
-    BOOST_PP_EXPAND(BOOST_PP_CAT(SetConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
-/**
-    @brief This macro is executed if you call SetConsoleCommand() with 2 arguments.
-    @param name The name (string) of the console command
-    @param functionpointer The function-pointer of the corresponding command-function
-*/
-#define SetConsoleCommand2(name, functionpointer) \
-    SetConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer))
-/**
-    @brief This macro is executed if you call SetConsoleCommand() with 3 arguments.
-    @param group The group (string) of the console command
-    @param name The name (string) of the console command
-    @param functionpointer The function-pointer of the corresponding command-function
-*/
-#define SetConsoleCommand3(group, name, functionpointer) \
-    SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer))
-/**
-    @brief This macro is executed if you call SetConsoleCommand() with 4 arguments.
-    @param group The group (string) of the console command
-    @param name The name (string) of the console command
-    @param functionpointer The function-pointer of the corresponding command-function
-    @param object The object that will be assigned to the command. Used for member-functions.
-*/
-#define SetConsoleCommand4(group, name, functionpointer, object) \
-    SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer, object))
-
-/// Internal macro
-#define SetConsoleCommandGeneric(group, name, functor) \
-    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor)))
-
-
-/**
-    @brief Declares a console command. The macro is overloaded for 2-3 parameters.
-
-    This is an overloaded macro. Depending on the number of arguments a different
-    overloaded implementation of the macro will be chosen.
-
-    Console commands created with DeclareConsoleCommand() don't use the the given
-    function-pointer to execute the command, it is only used to define the header
-    of the future command-function. The command is inactive until you manually
-    set a function with orxonox::ModifyConsoleCommand(). You can use a different
-    function-pointer than in the final command, as long as it has the same header.
-*/
-#define DeclareConsoleCommand(...) \
-    BOOST_PP_EXPAND(BOOST_PP_CAT(DeclareConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
-/**
-    @brief This macro is executed if you call DeclareConsoleCommand() with 2 arguments.
-    @param name The name (string) of the console command
-    @param functionpointer The function-pointer of an arbitrary function that has the same header as the final function
-*/
-#define DeclareConsoleCommand2(name, functionpointer) \
-    DeclareConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer))
-/**
-    @brief This macro is executed if you call DeclareConsoleCommand() with 3 arguments.
-    @param group The group (string) of the console command
-    @param name The name (string) of the console command
-    @param functionpointer The function-pointer of an arbitrary function that has the same header as the final function
-*/
-#define DeclareConsoleCommand3(group, name, functionpointer) \
-    DeclareConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer))
-
-/// Internal macro
-#define DeclareConsoleCommandGeneric(group, name, functor) \
-    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor), false))
-
-
 namespace orxonox
 {
     /**
@@ -656,44 +394,6 @@
             LanguageEntryLabel descriptionReturnvalue_;                     ///< A description of the return-value
             LanguageEntryLabel descriptionParam_[MAX_FUNCTOR_ARGUMENTS];    ///< A description for each argument
     };
-
-    /**
-        @brief Creates a new ConsoleCommand.
-        @param name The name of the command
-        @param executor The executor of the command
-        @param bInitialized If true, the command is ready to be executed, otherwise it has to be activated first.
-    */
-    inline ConsoleCommand* createConsoleCommand(const std::string& name, const ExecutorPtr& executor, bool bInitialized = true)
-        { return new ConsoleCommand("", name, executor, bInitialized); }
-    /**
-        @brief Creates a new ConsoleCommand.
-        @param group The group of the command
-        @param name The name of the command
-        @param executor The executor of the command
-        @param bInitialized If true, the command is ready to be executed, otherwise it has to be activated first.
-    */
-    inline ConsoleCommand* createConsoleCommand(const std::string& group, const std::string& name, const ExecutorPtr& executor, bool bInitialized = true)
-        { return new ConsoleCommand(group, name, executor, bInitialized); }
-
-
-    /**
-        @brief Returns a manipulator for a command with the given name.
-
-        @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
-        but it can still be used without checks, because all functions of ConsoleCommandManipulator
-        check internally if the command exists.
-    */
-    inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& name)
-        { return ConsoleCommandManager::getCommand(name, true); }
-    /**
-        @brief Returns a manipulator for a command with the given group and name.
-
-        @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
-        but it can still be used without checks, because all functions of ConsoleCommandManipulator
-        check internally if the command exists.
-    */
-    inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& group, const std::string& name)
-        { return ConsoleCommandManager::getCommand(group, name, true); }
 }
 
 #endif /* _ConsoleCommand_H__ */

Modified: code/branches/core7/src/libraries/core/command/ConsoleCommandCompilation.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/ConsoleCommandCompilation.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/ConsoleCommandCompilation.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -40,7 +40,7 @@
 #include "util/Output.h"
 #include "util/ExprParser.h"
 #include "util/StringUtils.h"
-#include "ConsoleCommand.h"
+#include "ConsoleCommandIncludes.h"
 #include "CommandExecutor.h"
 
 namespace orxonox

Added: code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
===================================================================
--- code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h	                        (rev 0)
+++ code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h	2015-04-06 13:47:42 UTC (rev 10347)
@@ -0,0 +1,345 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @defgroup ConsoleCommand Console commands
+    @ingroup Command
+*/
+
+/**
+    @file
+    @ingroup Command ConsoleCommand
+    @brief Declaration the SetConsoleCommand() macro.
+
+    @anchor ConsoleCommandExample
+
+    Console commands can be used to write scripts, use key-bindings or simply to be
+    entered into the shell by the user. Instances of orxonox::ConsoleCommand define
+    the function of a command, and also more information like, for example, if it is
+    active, default values, and possible arguments.
+
+    Commands need to be registered to the system statically on startup by using the
+    SetConsoleCommand() or DeclareConsoleCommand() macros outside of a function.
+    This ensures that commands are known to the system at any time, so they can be
+    evaluated (see orxonox::CommandExecutor::evaluate()), for example for key-bindings.
+
+    Example:
+    @code
+    void myCoutFunction(const std::string& text)        // Define a static function
+    {
+        orxout() << "Text: " << text << endl;           // Print the text to the console
+    }
+
+    SetConsoleCommand("cout", &myCoutFunction);         // Register the function as command with name "cout"
+    @endcode
+
+    Now you can open the shell and execute the command:
+    @code
+    $ cout Hello World
+    @endcode
+
+    Internally this command is now passed to orxonox::CommandExecutor::execute():
+    @code
+    CommandExecutor::execute("cout HelloWorld");
+    @endcode
+
+    CommandExecutor searches for a command with name "cout" and passes the arguments
+    "Hello World" to it. Because we registered myCoutFunction() with this command,
+    as a result the following text will be printed to the console:
+    @code
+    Text: Hello World
+    @endcode
+
+    You can add more attributes to the ConsoleCommand, by using the command-chain feature
+    of SetConsoleCommand(). For example like this:
+    @code
+    SetConsoleCommand("cout", &myCoutFunction)
+        .addGroup("output", "text")
+        .accessLevel(AccessLevel::Offline)
+        .defaultValues("no text");
+    @endcode
+
+    Open the shell again and try it:
+    @code
+    $ cout Hello World
+    Text: Hello World
+    $ output text Hello World
+    Text: Hello World
+    $ cout
+    Text: no text
+    @endcode
+
+    If you execute it online (note: the access level is "Offline"), you will see the
+    following (or something similar):
+    @code
+    $ cout Hello World
+    Error: Can't execute command "cout", access denied.
+    @endcode
+
+    If a command is executed, the arguments are passed to an underlying function,
+    whitch is wrapped by an orxonox::Functor which again is wrapped by an orxonox::Executor.
+    The Functor contains the function-pointer, as well as the object-pointer in
+    case of a non-static member-function. The executor stores possible default-values
+    for each argument of the function.
+
+    The function of a command can be changed at any time. It's possible to just exchange
+    the function-pointer of the underlying Functor if the headers of the functions are
+    exactly the same. But you can also exchange the Functor itself or even completely
+    replace the Executor. Also the other attributes of a ConsoleCommand can be modified
+    during the game, for example it can be activated or deactivated.
+
+    To do so, the function ModifyConsoleCommand() has to be used. It returns an instance
+    of orxonox::ConsoleCommand::ConsoleCommandManipulator which has an interface similar to
+    orxonox::ConsoleCommand, but with slight differences. You can use it the same way like
+    SetConsoleCommand(), meaning you can use command-chains to change different attributes at
+    the same time. ModifyConsoleCommand() must not be executed statically, but rather in a
+    function at some point of the execution of the program.
+
+    Example:
+    @code
+    void myOtherCoutFunction(const std::string& text)                       // Define a new static function
+    {
+        orxout() << "Uppercase: " << getUppercase(text) << endl;            // Print the text in uppercase to the console
+    }
+
+    {
+        // ...                                                              // somewhere in the code
+
+        ModifyConsoleCommand("cout").setFunction(&myOtherCoutFunction);     // Modify the underlying function of the command
+
+        // ...
+    }
+    @endcode
+
+    If you now enter the command into the shell, you'll see a different behavior:
+    @code
+    $ cout Hello World
+    Uppercase: HELLO WORLD
+    $ cout
+    Uppercase: NO TEXT
+    @endcode
+
+    A few important notes about changing functions:
+
+    Instead of changing the function with setFunction(), you can also create a command-stack
+    by using pushFunction() and popFunction(). It's important to note a few things about that,
+    because the underlying structure of Executor and Functor has a few pitfalls:
+     - If you push a new function-pointer, the same executor as before will be used (and, if
+       the headers match, even the same functor can be used, which is very fast)
+     - If you push a new Functor, the same executor as before will be used
+     - If you push a new Executor, everything is changed
+
+    Note that the executor contains the @b default @b values, so if you just exchange the
+    Functor, the default values remain the same. However if you decide to change the default
+    values at any point of the stack, <b>this will also change the default values on all
+    other stack-levels</b> that share the same executor. If you don't like this behavior,
+    you have to explicitly push a new executor before changing the default values, either by
+    calling pushFunction(executor) or by calling pushFunction(void) which pushes a copy of
+    the current executor to the stack.
+
+    Another important point are object pointers in case of non-static member-functions.
+    Whenever you set or push a new function, <b>you must add the object pointer again</b>
+    because objects are stored in the Functor which is usually exchanged if you change
+    the function.
+
+    You can also use a stack for objects, but note that this <b>object-stack is different for each
+    function</b> - so if you set a new function, the object-stack will be cleared. If you push
+    a new function, the old object-stack is stored in the stack, so it can be restored if
+    you pop the function.
+
+    %DeclareConsoleCommand():
+
+    Appart from SetConsoleCommand() you can also call DeclareConsoleCommand(). In contrast
+    to SetConsoleCommand(), this doesn't assign a function to the command. Indeed you have
+    to pass a function-pointer to DeclareConsoleCommand(), but it is only used to determine
+    the header of the future command-function. This allows to declare a command statically,
+    thus it's possible to evaluate key-bindings of this command, but the actual function
+    can be assigned at a later point.
+
+    Example:
+    @code
+    DeclareConsoleCommand("cout", &prototype::void__string);
+    @endcode
+
+    If you try to execute the command now, you see the following (or something similar):
+    @code
+    $ cout Hello World
+    Error: Can't execute command "cout", command is not active.
+    @endcode
+
+    You first have to assign a function to use the command:
+    @code
+    {
+        // ...
+
+        ModifyConsoleCommand("cout").setFunction(&myCoutFunction);
+
+        // ...
+    }
+    @endcode
+
+    Now you can use it:
+    @code
+    $ cout Hello World
+    Text: Hello World
+    @endcode
+
+    Note that the initial function prototype::void__string is defined in the namespace
+    orxonox::prototype. If there's no function with the desired header, you can extend
+    the collection of functions or simply use another function that has the same header.
+*/
+
+#ifndef _ConsoleCommandIncludes_H__
+#define _ConsoleCommandIncludes_H__
+
+#include "core/CorePrereqs.h"
+
+#include "ConsoleCommand.h"
+#include "ConsoleCommandManager.h"
+#include "util/VA_NARGS.h"
+
+
+/**
+    @brief Defines a console command. The macro is overloaded for 2-4 parameters.
+
+    This is an overloaded macro. Depending on the number of arguments a different
+    overloaded implementation of the macro will be chosen.
+
+    Console commands created with SetConsoleCommand() become active immediately and
+    the given function-pointer (and optionally the object) will be used to execute
+    the command.
+*/
+#define SetConsoleCommand(...) \
+    BOOST_PP_EXPAND(BOOST_PP_CAT(SetConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
+/**
+    @brief This macro is executed if you call SetConsoleCommand() with 2 arguments.
+    @param name The name (string) of the console command
+    @param functionpointer The function-pointer of the corresponding command-function
+*/
+#define SetConsoleCommand2(name, functionpointer) \
+    SetConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer))
+/**
+    @brief This macro is executed if you call SetConsoleCommand() with 3 arguments.
+    @param group The group (string) of the console command
+    @param name The name (string) of the console command
+    @param functionpointer The function-pointer of the corresponding command-function
+*/
+#define SetConsoleCommand3(group, name, functionpointer) \
+    SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer))
+/**
+    @brief This macro is executed if you call SetConsoleCommand() with 4 arguments.
+    @param group The group (string) of the console command
+    @param name The name (string) of the console command
+    @param functionpointer The function-pointer of the corresponding command-function
+    @param object The object that will be assigned to the command. Used for member-functions.
+*/
+#define SetConsoleCommand4(group, name, functionpointer, object) \
+    SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer, object))
+
+/// Internal macro
+#define SetConsoleCommandGeneric(group, name, functor) \
+    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor)))
+
+
+/**
+    @brief Declares a console command. The macro is overloaded for 2-3 parameters.
+
+    This is an overloaded macro. Depending on the number of arguments a different
+    overloaded implementation of the macro will be chosen.
+
+    Console commands created with DeclareConsoleCommand() don't use the the given
+    function-pointer to execute the command, it is only used to define the header
+    of the future command-function. The command is inactive until you manually
+    set a function with orxonox::ModifyConsoleCommand(). You can use a different
+    function-pointer than in the final command, as long as it has the same header.
+*/
+#define DeclareConsoleCommand(...) \
+    BOOST_PP_EXPAND(BOOST_PP_CAT(DeclareConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__))
+/**
+    @brief This macro is executed if you call DeclareConsoleCommand() with 2 arguments.
+    @param name The name (string) of the console command
+    @param functionpointer The function-pointer of an arbitrary function that has the same header as the final function
+*/
+#define DeclareConsoleCommand2(name, functionpointer) \
+    DeclareConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer))
+/**
+    @brief This macro is executed if you call DeclareConsoleCommand() with 3 arguments.
+    @param group The group (string) of the console command
+    @param name The name (string) of the console command
+    @param functionpointer The function-pointer of an arbitrary function that has the same header as the final function
+*/
+#define DeclareConsoleCommand3(group, name, functionpointer) \
+    DeclareConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer))
+
+/// Internal macro
+#define DeclareConsoleCommandGeneric(group, name, functor) \
+    static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) = (*orxonox::createConsoleCommand(group, name, orxonox::createExecutor(functor), false))
+
+
+namespace orxonox
+{
+    /**
+        @brief Creates a new ConsoleCommand.
+        @param name The name of the command
+        @param executor The executor of the command
+        @param bInitialized If true, the command is ready to be executed, otherwise it has to be activated first.
+    */
+    inline ConsoleCommand* createConsoleCommand(const std::string& name, const ExecutorPtr& executor, bool bInitialized = true)
+        { return new ConsoleCommand("", name, executor, bInitialized); }
+    /**
+        @brief Creates a new ConsoleCommand.
+        @param group The group of the command
+        @param name The name of the command
+        @param executor The executor of the command
+        @param bInitialized If true, the command is ready to be executed, otherwise it has to be activated first.
+    */
+    inline ConsoleCommand* createConsoleCommand(const std::string& group, const std::string& name, const ExecutorPtr& executor, bool bInitialized = true)
+        { return new ConsoleCommand(group, name, executor, bInitialized); }
+
+
+    /**
+        @brief Returns a manipulator for a command with the given name.
+
+        @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
+        but it can still be used without checks, because all functions of ConsoleCommandManipulator
+        check internally if the command exists.
+    */
+    inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& name)
+        { return ConsoleCommandManager::getCommand(name, true); }
+    /**
+        @brief Returns a manipulator for a command with the given group and name.
+
+        @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
+        but it can still be used without checks, because all functions of ConsoleCommandManipulator
+        check internally if the command exists.
+    */
+    inline ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string& group, const std::string& name)
+        { return ConsoleCommandManager::getCommand(group, name, true); }
+}
+
+#endif /* _ConsoleCommandIncludes_H__ */


Property changes on: code/branches/core7/src/libraries/core/command/ConsoleCommandIncludes.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: code/branches/core7/src/libraries/core/command/IRC.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/IRC.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/IRC.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -38,7 +38,7 @@
 #include "util/Convert.h"
 #include "util/Exception.h"
 #include "util/StringUtils.h"
-#include "ConsoleCommand.h"
+#include "ConsoleCommandIncludes.h"
 #include "TclThreadManager.h"
 
 namespace orxonox

Modified: code/branches/core7/src/libraries/core/command/TclBind.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/TclBind.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/TclBind.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -38,7 +38,7 @@
 #include "util/StringUtils.h"
 #include "core/PathConfig.h"
 #include "CommandExecutor.h"
-#include "ConsoleCommand.h"
+#include "ConsoleCommandIncludes.h"
 #include "TclThreadManager.h"
 
 namespace orxonox

Modified: code/branches/core7/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/command/TclThreadManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/command/TclThreadManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -46,7 +46,7 @@
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"
 #include "CommandExecutor.h"
-#include "ConsoleCommand.h"
+#include "ConsoleCommandIncludes.h"
 #include "TclBind.h"
 #include "TclThreadList.h"
 

Modified: code/branches/core7/src/libraries/core/config/SettingsConfigFile.cc
===================================================================
--- code/branches/core7/src/libraries/core/config/SettingsConfigFile.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/config/SettingsConfigFile.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -34,7 +34,7 @@
 #include "SettingsConfigFile.h"
 
 #include "util/StringUtils.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "ConfigFileManager.h"
 #include "ConfigValueContainer.h"
 

Modified: code/branches/core7/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/input/InputManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/input/InputManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -48,7 +48,7 @@
 #include "core/GraphicsManager.h"
 #include "core/config/ConfigValueIncludes.h"
 #include "core/commandline/CommandLineIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/command/Functor.h"
 
 #include "InputBuffer.h"

Modified: code/branches/core7/src/libraries/core/input/KeyBinderManager.cc
===================================================================
--- code/branches/core7/src/libraries/core/input/KeyBinderManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/input/KeyBinderManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -34,7 +34,7 @@
 #include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/LuaState.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "InputManager.h"
 #include "KeyDetector.h"
 

Modified: code/branches/core7/src/libraries/core/input/KeyDetector.cc
===================================================================
--- code/branches/core7/src/libraries/core/input/KeyDetector.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/input/KeyDetector.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -30,7 +30,7 @@
 
 #include "util/ScopedSingletonManager.h"
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "Button.h"
 #include "InputManager.h"
 #include "InputState.h"

Modified: code/branches/core7/src/libraries/core/input/Mouse.cc
===================================================================
--- code/branches/core7/src/libraries/core/input/Mouse.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/core/input/Mouse.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -30,7 +30,7 @@
 
 #include <ois/OISMouse.h>
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "InputState.h"
 
 #ifdef ORXONOX_PLATFORM_LINUX

Modified: code/branches/core7/src/libraries/network/Host.cc
===================================================================
--- code/branches/core7/src/libraries/network/Host.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/network/Host.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -33,7 +33,7 @@
 
 #include "core/CoreIncludes.h"
 #include "core/object/ObjectList.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "NetworkChatListener.h"
 
 namespace orxonox {

Modified: code/branches/core7/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/core7/src/libraries/network/MasterServer.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/network/MasterServer.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -28,7 +28,7 @@
 
 #include "MasterServer.h"
 #include "util/ScopedSingletonManager.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/CorePrereqs.h"
 #include "util/Output.h"

Modified: code/branches/core7/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/core7/src/libraries/tools/Timer.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/libraries/tools/Timer.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -39,7 +39,7 @@
 
 #include "util/Clock.h"
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/command/CommandExecutor.h"
 #include "core/command/Executor.h"
 #include "core/command/Functor.h"

Modified: code/branches/core7/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- code/branches/core7/src/modules/designtools/ScreenshotManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/designtools/ScreenshotManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -46,7 +46,7 @@
 #include "core/GraphicsManager.h"
 #include "core/PathConfig.h"
 #include "core/Resource.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "util/ScopedSingletonManager.h"
 #include "util/StringUtils.h"
 

Modified: code/branches/core7/src/modules/designtools/SkyboxGenerator.cc
===================================================================
--- code/branches/core7/src/modules/designtools/SkyboxGenerator.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/designtools/SkyboxGenerator.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -43,7 +43,7 @@
 #include "core/GraphicsManager.h"
 #include "core/PathConfig.h"
 #include "core/Resource.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/command/CommandExecutor.h"
 
 #include "controllers/HumanController.h"

Modified: code/branches/core7/src/modules/docking/Dock.cc
===================================================================
--- code/branches/core7/src/modules/docking/Dock.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/docking/Dock.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -36,7 +36,7 @@
 #include "core/CoreIncludes.h"
 #include "core/LuaState.h"
 #include "core/GUIManager.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "network/NetworkFunction.h"
 
 #include "infos/HumanPlayer.h"

Modified: code/branches/core7/src/modules/mini4dgame/Mini4Dgame.cc
===================================================================
--- code/branches/core7/src/modules/mini4dgame/Mini4Dgame.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/mini4dgame/Mini4Dgame.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -44,7 +44,7 @@
 #include "core/command/Executor.h"
 #include "core/config/ConfigValueIncludes.h"
 #include "infos/PlayerInfo.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "gamestates/GSLevel.h"
 #include "chat/ChatManager.h"

Modified: code/branches/core7/src/modules/objects/triggers/Trigger.cc
===================================================================
--- code/branches/core7/src/modules/objects/triggers/Trigger.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/objects/triggers/Trigger.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -37,7 +37,7 @@
 #include "core/CoreIncludes.h"
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "Scene.h"
 

Modified: code/branches/core7/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/core7/src/modules/overlays/hud/HUDNavigation.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/overlays/hud/HUDNavigation.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -40,7 +40,7 @@
 
 #include "util/Math.h"
 #include "util/Convert.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "CameraManager.h"

Modified: code/branches/core7/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/core7/src/modules/towerdefense/TowerDefense.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/modules/towerdefense/TowerDefense.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -86,7 +86,7 @@
 #include "chat/ChatManager.h"
 #include "core/CoreIncludes.h"
 /* Part of a temporary hack to allow the player to add towers */
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 namespace orxonox
 {

Modified: code/branches/core7/src/orxonox/Scene.cc
===================================================================
--- code/branches/core7/src/orxonox/Scene.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/Scene.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -43,7 +43,7 @@
 #include "core/GameMode.h"
 #include "core/GUIManager.h"
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "tools/BulletConversions.h"
 #include "tools/BulletDebugDrawer.h"
 #include "tools/DebugDrawer.h"

Modified: code/branches/core7/src/orxonox/Test.cc
===================================================================
--- code/branches/core7/src/orxonox/Test.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/Test.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -28,7 +28,7 @@
 
 #include "core/CoreIncludes.h"
 #include "core/config/ConfigValueIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "network/NetworkFunction.h"
 #include "Test.h"
 #include "util/MultiType.h"

Modified: code/branches/core7/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- code/branches/core7/src/orxonox/chat/ChatInputHandler.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/chat/ChatInputHandler.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -49,7 +49,7 @@
 #include "util/ScopedSingletonManager.h"
 #include "core/CoreIncludes.h"
 #include "core/GUIManager.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/input/InputBuffer.h"
 #include "core/input/InputManager.h"
 #include "core/input/InputState.h"

Modified: code/branches/core7/src/orxonox/chat/ChatManager.cc
===================================================================
--- code/branches/core7/src/orxonox/chat/ChatManager.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/chat/ChatManager.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -31,7 +31,7 @@
 
 #include "util/ScopedSingletonManager.h"
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "network/Host.h"
 
 #include "PlayerManager.h"

Modified: code/branches/core7/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/core7/src/orxonox/controllers/ArtificialController.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/controllers/ArtificialController.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -29,7 +29,7 @@
 #include "ArtificialController.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "worldentities/pawns/Pawn.h"
 #include "worldentities/pawns/SpaceShip.h"
 

Modified: code/branches/core7/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/core7/src/orxonox/controllers/FormationController.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/controllers/FormationController.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -32,7 +32,7 @@
 #include "core/CoreIncludes.h"
 
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "worldentities/ControllableEntity.h"
 #include "worldentities/pawns/Pawn.h"

Modified: code/branches/core7/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/branches/core7/src/orxonox/controllers/HumanController.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/controllers/HumanController.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -29,7 +29,7 @@
 #include "HumanController.h"
 
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "worldentities/ControllableEntity.h"
 #include "worldentities/pawns/Pawn.h"
 #include "gametypes/Gametype.h"

Modified: code/branches/core7/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/core7/src/orxonox/controllers/NewHumanController.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/controllers/NewHumanController.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -36,7 +36,7 @@
 #include <bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
 
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/input/KeyBinder.h"
 #include "core/input/KeyBinderManager.h"
 #include "worldentities/ControllableEntity.h"

Modified: code/branches/core7/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/core7/src/orxonox/gamestates/GSLevel.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/gamestates/GSLevel.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -43,7 +43,7 @@
 #include "core/GUIManager.h"
 #include "core/Loader.h"
 #include "core/XMLFile.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "LevelManager.h"
 #include "PlayerManager.h"

Modified: code/branches/core7/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/core7/src/orxonox/gamestates/GSMainMenu.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/gamestates/GSMainMenu.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -35,7 +35,7 @@
 #include "core/Game.h"
 #include "core/GraphicsManager.h"
 #include "core/GUIManager.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/input/KeyBinderManager.h"
 #include "network/Client.h"
 #include "util/StringUtils.h"

Modified: code/branches/core7/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/core7/src/orxonox/gamestates/GSRoot.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/gamestates/GSRoot.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -32,7 +32,7 @@
 #include "core/BaseObject.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "network/NetworkFunction.h"
 #include "tools/Timer.h"
 #include "tools/interfaces/Tickable.h"

Modified: code/branches/core7/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/core7/src/orxonox/gametypes/Gametype.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/gametypes/Gametype.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -33,7 +33,7 @@
 #include "core/CoreIncludes.h"
 #include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "gamestates/GSLevel.h"
 
 #include "infos/PlayerInfo.h"

Modified: code/branches/core7/src/orxonox/gametypes/Mission.cc
===================================================================
--- code/branches/core7/src/orxonox/gametypes/Mission.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/gametypes/Mission.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -32,7 +32,7 @@
 #include "controllers/ArtificialController.h"
 
 #include "core/CoreIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "infos/PlayerInfo.h"
 #include "network/Host.h"
 #include "worldentities/pawns/Pawn.h"

Modified: code/branches/core7/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/core7/src/orxonox/overlays/InGameConsole.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/overlays/InGameConsole.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -49,7 +49,7 @@
 #include "util/output/OutputManager.h"
 #include "core/CoreIncludes.h"
 #include "core/config/ConfigValueIncludes.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/GUIManager.h"
 #include "core/input/InputManager.h"
 #include "core/input/InputState.h"

Modified: code/branches/core7/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/branches/core7/src/orxonox/overlays/OrxonoxOverlay.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/overlays/OrxonoxOverlay.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -47,7 +47,7 @@
 #include "core/GameMode.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "OverlayGroup.h"
 

Modified: code/branches/core7/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/core7/src/orxonox/overlays/OverlayGroup.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/overlays/OverlayGroup.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -35,7 +35,7 @@
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "OrxonoxOverlay.h"
 
 namespace orxonox

Modified: code/branches/core7/src/orxonox/sound/WorldAmbientSound.cc
===================================================================
--- code/branches/core7/src/orxonox/sound/WorldAmbientSound.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/sound/WorldAmbientSound.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -32,7 +32,7 @@
 #include "core/EventIncludes.h"
 #include "core/XMLPort.h"
 #include "AmbientSound.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include <exception>
 
 

Modified: code/branches/core7/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -36,7 +36,7 @@
 #include "core/XMLPort.h"
 #include "util/Math.h"
 #include "gametypes/Gametype.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "items/ShipPart.h"
 #include "items/Engine.h"

Modified: code/branches/core7/src/orxonox/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/core7/src/orxonox/worldentities/pawns/Spectator.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/src/orxonox/worldentities/pawns/Spectator.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -33,7 +33,7 @@
 #include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/command/CommandExecutor.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 
 #include "tools/BillboardSet.h"
 #include "Scene.h"

Modified: code/branches/core7/test/core/command/CommandTest.cc
===================================================================
--- code/branches/core7/test/core/command/CommandTest.cc	2015-04-05 18:25:11 UTC (rev 10346)
+++ code/branches/core7/test/core/command/CommandTest.cc	2015-04-06 13:47:42 UTC (rev 10347)
@@ -1,5 +1,5 @@
 #include <gtest/gtest.h>
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/command/CommandExecutor.h"
 #include "core/object/Destroyable.h"
 




More information about the Orxonox-commit mailing list