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

Method GetArgObject

sdk/angelscript/source/as_generic.cpp:262–279  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

260
261// interface
262void *asCGeneric::GetArgObject(asUINT arg)
263{
264 if( arg >= (unsigned)sysFunction->parameterTypes.GetLength() )
265 return 0;
266
267 // Verify that the type is correct
268 asCDataType *dt = &sysFunction->parameterTypes[arg];
269 if( !dt->IsObject() && !dt->IsFuncdef() )
270 return 0;
271
272 // Determine the position of the argument
273 int offset = 0;
274 for( asUINT n = 0; n < arg; n++ )
275 offset += sysFunction->parameterTypes[n].GetSizeOnStackDWords();
276
277 // Get the value
278 return *(void**)(&stackPointer[offset]);
279}
280
281// interface
282void *asCGeneric::GetAddressOfArg(asUINT arg)

Callers 15

StringScanFunction · 0.80
AssignStringGenericFunction · 0.80
AddAssignStringGenericFunction · 0.80
AssignStringGenericFunction · 0.80
printFunction · 0.80
AssignStringGenericFunction · 0.80

Calls 4

IsObjectMethod · 0.80
IsFuncdefMethod · 0.80
GetSizeOnStackDWordsMethod · 0.80
GetLengthMethod · 0.45

Tested by 15

AssignStringGenericFunction · 0.64
printFunction · 0.64
AssignStringGenericFunction · 0.64
LogFunction · 0.64
SetMyAnyFunction · 0.64
GetFunction · 0.64
GenFunc1Function · 0.64
GenAssignFunction · 0.64
TestStringFunction · 0.64