Castle Game Engine: CastleScript: Class TCasScriptFunctionHandlers

# Class TCasScriptFunctionHandlers
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleScript ## Declaration `type TCasScriptFunctionHandlers = class(TObject)` ## Description This specifies for each type combination (array of TCasScriptValue classes) and for each function (TCasScriptFunction class) how they should be handled. You can think of this as a table that has a handler for each possible TCasScriptValue sequence and TCasScriptFunction combination. The idea is to allow programmer to extend KambiScipt by Defining new types of values for CastleScript: add new TCasScriptValue class, and create handlers for known functions to handle this type. It may be comfortable to place these handlers as private methods within your new TCasScriptValue descendant, although this is your private decision. Defining new functions for CastleScript: add new TCasScriptFunction class, and create handlers for known values to be handled by this function. It may be comfortable to place these handlers as private methods within your new TCasScriptFunction descendant, although this is your private decision. You have a guarantee that every registered here Handler will be called only with AFunction of registstered type and all Arguments matching the array of registered types and satisfying VariableArgumentsCount setting. As a bonus, this also provides a list of all usable function classes. That's because you have to register at least one handler for each TCasScriptFunction descendant to make this function actually usable, so we know about it here. ## Hierarchy TObject TCasScriptFunctionHandlers ## Overview ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure RegisterHandler( AHandler: TCasScriptFunctionHandler; AFunctionClass: TCasScriptFunctionClass; const AArgumentClasses: array of TCasScriptValueClass; const AVariableArgumentsCount: boolean);`
| `function SearchFunctionShortName(const AShortName: string): TCasScriptFunctionClass;`
## Description ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `procedure RegisterHandler( AHandler: TCasScriptFunctionHandler; AFunctionClass: TCasScriptFunctionClass; const AArgumentClasses: array of TCasScriptValueClass; const AVariableArgumentsCount: boolean);`
| `function SearchFunctionShortName(const AShortName: string): TCasScriptFunctionClass;`
Search for function class with matching ShortName. Returns `Nil` if not found.
Generated by PasDoc 0.13.0 on 2013-08-17 21:27:13