Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 5, 2008, 3:40:10 AM (17 years ago)
Author:
landauf
Message:
  • added exit command: quits orxonox (no, it's not a hidden segfault :D)
  • added exec command: executes files (that contain other commands)

funny: use the log function to write commands into orxonox.log and then use 'exec orxonox.log' - it works. I've even added a recursion-blocker to avoid an (almost) endless loop after logging 'exec orxonox.log' ;)

I'm currently thinking about more complex commands (what about delayed commands? or commands with returnvalue and a pipeline symbol?).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/ConsoleCommand.h

    r949 r993  
    4343
    4444
    45 #define ConsoleCommandShortcut(function, accesslevel) \
     45#define ConsoleCommandShortcut(classname, function, accesslevel) \
    4646    ConsoleCommandShortcutGeneric(function##consolecommand__, orxonox::createExecutor(orxonox::createFunctor(&classname::function), #function, accesslevel))
     47
     48#define ConsoleCommandShortcutExtern(function, accesslevel) \
     49    ConsoleCommandShortcutGeneric(function##consolecommand__, orxonox::createExecutor(orxonox::createFunctor(&function), #function, accesslevel))
    4750
    4851#define ConsoleCommandShortcutGeneric(fakevariable, executor) \
Note: See TracChangeset for help on using the changeset viewer.