217 #ifndef _ConsoleCommandIncludes_H__ 218 #define _ConsoleCommandIncludes_H__ 238 #define SetConsoleCommand(...) \ 239 BOOST_PP_EXPAND(BOOST_PP_CAT(SetConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__)) 245 #define SetConsoleCommand2(name, functionpointer) \ 246 SetConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer)) 253 #define SetConsoleCommand3(group, name, functionpointer) \ 254 SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer)) 262 #define SetConsoleCommand4(group, name, functionpointer, object) \ 263 SetConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer, object)) 266 #define SetConsoleCommandGeneric(group, name, functor) \ 267 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) \ 268 = (new orxonox::SI_CC(new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor))))->getCommand() 283 #define DeclareConsoleCommand(...) \ 284 BOOST_PP_EXPAND(BOOST_PP_CAT(DeclareConsoleCommand, ORXONOX_VA_NARGS(__VA_ARGS__))(__VA_ARGS__)) 290 #define DeclareConsoleCommand2(name, functionpointer) \ 291 DeclareConsoleCommandGeneric("", name, orxonox::createFunctor(functionpointer)) 298 #define DeclareConsoleCommand3(group, name, functionpointer) \ 299 DeclareConsoleCommandGeneric(group, name, orxonox::createFunctor(functionpointer)) 302 #define DeclareConsoleCommandGeneric(group, name, functor) \ 303 static orxonox::ConsoleCommand& BOOST_PP_CAT(__consolecommand_, __UNIQUE_NUMBER__) \ 304 = (new orxonox::SI_CC(new orxonox::ConsoleCommand(group, name, orxonox::createExecutor(functor), false)))->getCommand() 318 virtual void load()
override;
319 virtual void unload()
override;
322 {
return *this->command_; }
~StaticallyInitializedConsoleCommand()
Definition: ConsoleCommandIncludes.h:316
The ConsoleCommand class stores all information about a console command which can be executed by Comm...
Definition: ConsoleCommand.h:88
Declaration of the ORXONOX_VA_NARGS macro which returns the number of arguments passed to a variadic ...
ConsoleCommand * command_
Definition: ConsoleCommandIncludes.h:325
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
ConsoleCommand * getCommand(const std::string &name, bool bPrintError=false)
Returns a command (shortcut) with given name.
Definition: ConsoleCommandManager.h:65
Definition: ConsoleCommandIncludes.h:309
ConsoleCommand & getCommand()
Definition: ConsoleCommandIncludes.h:321
StaticallyInitializedConsoleCommand(ConsoleCommand *command)
Definition: ConsoleCommandIncludes.h:312
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
Definition: StaticallyInitializedInstance.h:36
#define _CoreExport
Definition: CorePrereqs.h:61
Declaration of the orxonox::ConsoleCommand class.
static constexpr Type CONSOLE_COMMAND
Definition: CorePrereqs.h:97
ConsoleCommand::ConsoleCommandManipulator ModifyConsoleCommand(const std::string &name)
Returns a manipulator for a command with the given name.
Definition: ConsoleCommandIncludes.h:337
static ConsoleCommandManager & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
StaticallyInitializedConsoleCommand SI_CC
Definition: ConsoleCommandIncludes.h:328
Helper class that is used to manipulate console commands.
Definition: ConsoleCommand.h:124