Changeset 3268 for code/branches/netp6
- Timestamp:
- Jul 1, 2009, 6:20:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp6/src/core/ConsoleCommand.h
r3196 r3268 32 32 #include "CorePrereqs.h" 33 33 34 #include <boost/preprocessor/cat.hpp> 35 34 36 #include "ArgumentCompletionFunctions.h" 35 37 #include "CommandExecutor.h" … … 39 41 40 42 #define SetConsoleCommand(classname, function, bCreateShortcut) \ 41 SetConsoleCommand AliasMulti(classname, function, #function, 0, bCreateShortcut)43 SetConsoleCommandGeneric(classname, function, #function, bCreateShortcut) 42 44 #define SetConsoleCommandAlias(classname, function, name, bCreateShortcut) \ 43 SetConsoleCommandAliasMulti(classname, function, name, 0, bCreateShortcut) 44 #define SetConsoleCommandAliasMulti(classname, function, name, number, bCreateShortcut) \ 45 SetConsoleCommandGeneric(classname##function##consolecommand__##number, classname, orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name), bCreateShortcut) 45 SetConsoleCommandGeneric(classname, function, name, bCreateShortcut) 46 46 47 #define SetConsoleCommandGeneric( fakevariable, classname, command, bCreateShortcut) \48 orxonox::ConsoleCommand& fakevariable = orxonox::ClassIdentifier<classname>::getIdentifier(#classname)->addConsoleCommand(command, bCreateShortcut)47 #define SetConsoleCommandGeneric(classname, function, name, bCreateShortcut) \ 48 orxonox::ConsoleCommand& BOOST_PP_CAT(classname##function##consolecommand__, __LINE__) = orxonox::ClassIdentifier<classname>::getIdentifier(#classname)->addConsoleCommand(orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name), bCreateShortcut) 49 49 50 50 51 51 #define SetConsoleCommandShortcut(classname, function) \ 52 SetConsoleCommandShortcutAlias Multi(classname, function, #function, 0)52 SetConsoleCommandShortcutAliasGeneric(classname, function, #function) 53 53 #define SetConsoleCommandShortcutAlias(classname, function, name) \ 54 SetConsoleCommandShortcutAlias Multi(classname, function, name, 0)55 #define SetConsoleCommandShortcutAlias Multi(classname, function, name, number) \56 SetConsoleCommandShortcutGeneric( function##consolecommand__##number, orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name))54 SetConsoleCommandShortcutAliasGeneric(classname, function, name) 55 #define SetConsoleCommandShortcutAliasGeneric(classname, function, name) \ 56 SetConsoleCommandShortcutGeneric(BOOST_PP_CAT(function##consolecommand__, __LINE__), orxonox::createConsoleCommand(orxonox::createFunctor(&classname::function), name)) 57 57 58 58 #define SetConsoleCommandShortcutExtern(function) \ 59 SetConsoleCommandShortcutExternAlias Multi(function, #function, 0)59 SetConsoleCommandShortcutExternAliasGeneric(function, #function) 60 60 #define SetConsoleCommandShortcutExternAlias(function, name) \ 61 SetConsoleCommandShortcutExternAlias Multi(function, name, 0)62 #define SetConsoleCommandShortcutExternAlias Multi(function, name, number) \63 SetConsoleCommandShortcutGeneric( function##consolecommand__##number, orxonox::createConsoleCommand(orxonox::createFunctor(&function), name))61 SetConsoleCommandShortcutExternAliasGeneric(function, name) 62 #define SetConsoleCommandShortcutExternAliasGeneric(function, name) \ 63 SetConsoleCommandShortcutGeneric(BOOST_PP_CAT(function##consolecommand__, __LINE__), orxonox::createConsoleCommand(orxonox::createFunctor(&function), name)) 64 64 65 65 #define SetConsoleCommandShortcutGeneric(fakevariable, command) \
Note: See TracChangeset
for help on using the changeset viewer.