interface
| 1474 | |
| 1475 | // interface |
| 1476 | int asCScriptFunction::GetParam(asUINT index, int *out_typeId, asDWORD *out_flags, const char **out_name, const char **out_defaultArg) const |
| 1477 | { |
| 1478 | if( index >= parameterTypes.GetLength() ) |
| 1479 | return asINVALID_ARG; |
| 1480 | |
| 1481 | if( out_typeId ) |
| 1482 | *out_typeId = engine->GetTypeIdFromDataType(parameterTypes[index]); |
| 1483 | |
| 1484 | if( out_flags ) |
| 1485 | { |
| 1486 | *out_flags = inOutFlags[index]; |
| 1487 | *out_flags |= parameterTypes[index].IsReadOnly() ? asTM_CONST : 0; |
| 1488 | } |
| 1489 | |
| 1490 | if( out_name ) |
| 1491 | { |
| 1492 | // The parameter names are not stored if loading from bytecode without debug information |
| 1493 | if( index < parameterNames.GetLength() ) |
| 1494 | *out_name = parameterNames[index].AddressOf(); |
| 1495 | else |
| 1496 | *out_name = 0; |
| 1497 | } |
| 1498 | |
| 1499 | if( out_defaultArg ) |
| 1500 | { |
| 1501 | if( index < defaultArgs.GetLength() && defaultArgs[index] ) |
| 1502 | *out_defaultArg = defaultArgs[index]->AddressOf(); |
| 1503 | else |
| 1504 | *out_defaultArg = 0; |
| 1505 | } |
| 1506 | |
| 1507 | return asSUCCESS; |
| 1508 | } |
| 1509 | |
| 1510 | // interface |
| 1511 | asIScriptEngine *asCScriptFunction::GetEngine() const |