| 336 | } |
| 337 | |
| 338 | void ListFunctions(asIScriptEngine *engine) |
| 339 | { |
| 340 | asUINT n; |
| 341 | |
| 342 | // List the application registered functions |
| 343 | cout << "Application functions:" << endl; |
| 344 | for( n = 0; n < (asUINT)engine->GetGlobalFunctionCount(); n++ ) |
| 345 | { |
| 346 | asIScriptFunction *func = engine->GetGlobalFunctionByIndex(n); |
| 347 | |
| 348 | // Skip the functions that start with _ as these are not meant to be called explicitly by the user |
| 349 | if( func->GetName()[0] != '_' ) |
| 350 | cout << " " << func->GetDeclaration() << endl; |
| 351 | } |
| 352 | |
| 353 | // List the user functions in the module |
| 354 | asIScriptModule *mod = engine->GetModule("console"); |
| 355 | if( mod ) |
| 356 | { |
| 357 | cout << endl; |
| 358 | cout << "User functions:" << endl; |
| 359 | for( n = 0; n < (asUINT)mod->GetFunctionCount(); n++ ) |
| 360 | { |
| 361 | asIScriptFunction *func = mod->GetFunctionByIndex(n); |
| 362 | cout << " " << func->GetDeclaration() << endl; |
| 363 | } |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | void grab(int v) |
| 368 | { |
no test coverage detected