MCPcopy Create free account
hub / github.com/anjo76/angelscript / GetParam

Method GetParam

sdk/angelscript/source/as_scriptfunction.cpp:1476–1508  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

1474
1475// interface
1476int 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
1511asIScriptEngine *asCScriptFunction::GetEngine() const

Callers 9

PrintMatchingFuncsMethod · 0.80
GetArgsOnStackCountMethod · 0.80
CompareRelationFunction · 0.80
CompareEqualityFunction · 0.80
PrecacheMethod · 0.80
TestFunction · 0.80
ValidateMethod · 0.80
test_saveload.cppFile · 0.80

Calls 4

GetTypeIdFromDataTypeMethod · 0.80
GetLengthMethod · 0.45
IsReadOnlyMethod · 0.45
AddressOfMethod · 0.45

Tested by 2

TestFunction · 0.64
ValidateMethod · 0.64