Index: /code/branches/core7/src/libraries/core/Core.cc
===================================================================
--- /code/branches/core7/src/libraries/core/Core.cc	(revision 10344)
+++ /code/branches/core7/src/libraries/core/Core.cc	(revision 10345)
@@ -60,5 +60,5 @@
 #include "util/SignalHandler.h"
 #include "PathConfig.h"
-#include "commandline/CommandLineParser.h"
+#include "commandline/CommandLineIncludes.h"
 #include "config/ConfigFileManager.h"
 #include "config/ConfigValueIncludes.h"
@@ -140,4 +140,5 @@
         }
 
+        // TODO: initialize CommandLineParser here
         ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
 
Index: /code/branches/core7/src/libraries/core/PathConfig.cc
===================================================================
--- /code/branches/core7/src/libraries/core/PathConfig.cc	(revision 10344)
+++ /code/branches/core7/src/libraries/core/PathConfig.cc	(revision 10345)
@@ -53,5 +53,5 @@
 #include "util/Output.h"
 #include "util/Exception.h"
-#include "commandline/CommandLineParser.h"
+#include "commandline/CommandLineIncludes.h"
 
 // Differentiate Boost Filesystem v2 and v3
Index: /code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h
===================================================================
--- /code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h	(revision 10345)
+++ /code/branches/core7/src/libraries/core/commandline/CommandLineIncludes.h	(revision 10345)
@@ -0,0 +1,73 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @defgroup CmdArgs Commandline arguments
+    @ingroup Config
+    @brief For a reference of all commandline arguments see @ref cmdargspage
+*/
+
+/**
+    @file
+    @ingroup Config CmdArgs
+    @brief Declaration of CommandLineParser and CommandLineArgument, definition of the SetCommandLineArgument() macros.
+*/
+
+#ifndef _CommandLineIncludes_H__
+#define _CommandLineIncludes_H__
+
+#include "core/CorePrereqs.h"
+
+#include "CommandLineParser.h"
+#include "core/module/StaticallyInitializedInstance.h"
+
+#define SetCommandLineArgument(name, defaultValue) \
+    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
+    = (new orxonox::StaticallyInitializedCommandLineArgument(new orxonox::CommandLineArgument(#name, defaultValue)))->getArgument()
+#define SetCommandLineSwitch(name) \
+    SetCommandLineArgument(name, false)
+
+namespace orxonox
+{
+    class _CoreExport StaticallyInitializedCommandLineArgument : public StaticallyInitializedInstance
+    {
+        public:
+            StaticallyInitializedCommandLineArgument(CommandLineArgument* argument) : argument_(argument) {}
+
+            virtual void load()
+                { CommandLineParser::addArgument(this->argument_); }
+
+            inline CommandLineArgument& getArgument()
+                { return *this->argument_; }
+
+        private:
+            CommandLineArgument* argument_;
+    };
+}
+
+#endif /* _CommandLineIncludes_H__ */
Index: /code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc
===================================================================
--- /code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc	(revision 10344)
+++ /code/branches/core7/src/libraries/core/commandline/CommandLineParser.cc	(revision 10345)
@@ -338,3 +338,19 @@
         }
     }
+
+    /**
+    @brief
+        Adds a new CommandLineArgument to the internal map.
+        Note that only such arguments are actually valid.
+    */
+    void CommandLineParser::addArgument(CommandLineArgument* argument)
+    {
+        OrxAssert(!_getInstance().existsArgument(argument->getName()),
+            "Cannot add a command line argument with name '" + argument->getName() + "' twice.");
+        OrxAssert(!argument->getDefaultValue().isType<bool>() || argument->getDefaultValue().get<bool>() != true,
+               "Boolean command line arguments with positive default values are not supported." << endl
+            << "Please use SetCommandLineSwitch and adjust your argument: " << argument->getName());
+
+        _getInstance().cmdLineArgs_[argument->getName()] = argument;
+    }
 }
Index: /code/branches/core7/src/libraries/core/commandline/CommandLineParser.h
===================================================================
--- /code/branches/core7/src/libraries/core/commandline/CommandLineParser.h	(revision 10344)
+++ /code/branches/core7/src/libraries/core/commandline/CommandLineParser.h	(revision 10345)
@@ -49,11 +49,4 @@
 #include "util/MultiType.h"
 
-#define SetCommandLineArgument(name, defaultValue) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, defaultValue)
-#define SetCommandLineSwitch(name) \
-    orxonox::CommandLineArgument& CmdArgumentDummyBoolVar##name \
-    = orxonox::CommandLineParser::addArgument(#name, false)
-
 namespace orxonox
 {
@@ -80,4 +73,13 @@
 
     public:
+        //! Constructor initialises both value_ and defaultValue_ with defaultValue.
+        CommandLineArgument(const std::string& name, const MultiType& defaultValue)
+            : bHasDefaultValue_(true)
+            , name_(name)
+            , value_(defaultValue)
+            , defaultValue_(defaultValue)
+        { }
+        ~CommandLineArgument() { }
+
         //! Tells whether the value has been changed by the command line.
         bool hasDefaultValue() const { return bHasDefaultValue_; }
@@ -104,15 +106,6 @@
 
     private:
-        //! Constructor initialises both value_ and defaultValue_ with defaultValue.
-        CommandLineArgument(const std::string& name, const MultiType& defaultValue)
-            : bHasDefaultValue_(true)
-            , name_(name)
-            , value_(defaultValue)
-            , defaultValue_(defaultValue)
-        { }
-
         //! Undefined copy constructor
         CommandLineArgument(const CommandLineArgument& instance);
-        ~CommandLineArgument() { }
 
         //! Parses the value string of a command line argument.
@@ -158,6 +151,5 @@
         static const MultiType& getValue(const std::string& name)
         { return getArgument(name)->getValue(); }
-        template <class T>
-        static CommandLineArgument& addArgument(const std::string& name, T defaultValue);
+        static void addArgument(CommandLineArgument* argument);
 
         static bool existsArgument(const std::string& name)
@@ -202,25 +194,4 @@
         *value = getArgument(name)->getValue().get<std::string>();
     }
-
-    /**
-    @brief
-        Adds a new CommandLineArgument to the internal map.
-        Note that only such arguments are actually valid.
-    @param name
-        Name of the argument. Shortcut can be added later.
-    @param defaultValue
-        Default value that is used when argument was not given.
-    */
-    template <class T>
-    CommandLineArgument& CommandLineParser::addArgument(const std::string& name, T defaultValue)
-    {
-        OrxAssert(!_getInstance().existsArgument(name),
-            "Cannot add a command line argument with name '" + name + "' twice.");
-        OrxAssert(!MultiType(defaultValue).isType<bool>() || MultiType(defaultValue).get<bool>() != true,
-               "Boolean command line arguments with positive default values are not supported." << endl
-            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
-
-        return *(_getInstance().cmdLineArgs_[name] = new CommandLineArgument(name, defaultValue));
-    }
 }
 
Index: /code/branches/core7/src/libraries/core/input/InputManager.cc
===================================================================
--- /code/branches/core7/src/libraries/core/input/InputManager.cc	(revision 10344)
+++ /code/branches/core7/src/libraries/core/input/InputManager.cc	(revision 10345)
@@ -48,5 +48,5 @@
 #include "core/GraphicsManager.h"
 #include "core/config/ConfigValueIncludes.h"
-#include "core/commandline/CommandLineParser.h"
+#include "core/commandline/CommandLineIncludes.h"
 #include "core/command/ConsoleCommand.h"
 #include "core/command/Functor.h"
Index: /code/branches/core7/src/orxonox/LevelManager.cc
===================================================================
--- /code/branches/core7/src/orxonox/LevelManager.cc	(revision 10344)
+++ /code/branches/core7/src/orxonox/LevelManager.cc	(revision 10345)
@@ -37,5 +37,5 @@
 
 #include "util/ScopedSingletonManager.h"
-#include "core/commandline/CommandLineParser.h"
+#include "core/commandline/CommandLineIncludes.h"
 #include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
Index: /code/branches/core7/src/orxonox/Main.cc
===================================================================
--- /code/branches/core7/src/orxonox/Main.cc	(revision 10344)
+++ /code/branches/core7/src/orxonox/Main.cc	(revision 10345)
@@ -36,5 +36,5 @@
 #include "Main.h"
 
-#include "core/commandline/CommandLineParser.h"
+#include "core/commandline/CommandLineIncludes.h"
 #include "core/Game.h"
 #include "core/LuaState.h"
Index: /code/branches/core7/src/orxonox/gamestates/GSClient.cc
===================================================================
--- /code/branches/core7/src/orxonox/gamestates/GSClient.cc	(revision 10344)
+++ /code/branches/core7/src/orxonox/gamestates/GSClient.cc	(revision 10345)
@@ -30,5 +30,5 @@
 
 #include "util/Exception.h"
-#include "core/commandline/CommandLineParser.h"
+#include "core/commandline/CommandLineIncludes.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
Index: /code/branches/core7/src/orxonox/gamestates/GSServer.cc
===================================================================
--- /code/branches/core7/src/orxonox/gamestates/GSServer.cc	(revision 10344)
+++ /code/branches/core7/src/orxonox/gamestates/GSServer.cc	(revision 10345)
@@ -30,5 +30,5 @@
 
 #include "util/Output.h"
-#include "core/commandline/CommandLineParser.h"
+#include "core/commandline/CommandLineIncludes.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
