Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 2 and Version 3 of code/doc/CommandExecutor


Ignore:
Timestamp:
Oct 1, 2008, 3:01:18 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/CommandExecutor

    v2 v3  
    11= !CommandExecutor =
    22[[TracNav(TracNav/TOC_Development)]]
     3[[TOC]]
    34
    45== Description ==
     6!CommandExecutor is a parser that calls a function defined by a string. To do this, !CommandExecutor searches for a [wiki:ConsoleCommand] with the given name, parses the arguments and calls the command. !CommandExecutor is also able to give hints to a function (what the function does) and to complete classnames, functionnames and arguments (see [wiki:ArgumentCompleter]).
     7
     8All existing !ConsoleCommands are stored in maps: Commands belonging to a class are stored in the Identifier of the class while shortcuts are stored in a map located in the !CommandExecutor itself.
     9
     10Another feature: !CommandExecutor can evaluate a given command without calling it. To achieve this, !CommandExecutor returns a [wiki:CommandEvaluation], containing a pointer to the !ConsoleCommand and all arguments stored in [wiki:MultiType MultiTypes], already converted to the requested type. This allows you to execute an evaluated command really fast, which is of interest if you execute the same command over and over.
     11
     12To execute more complex commands, !CommandExecutor uses [wiki:TclBind].
    513
    614== Usage ==