MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / GetThisTypeId

Method GetThisTypeId

src/server/angelscript/angelscript/source/as_context.cpp:5571–5584  ·  view source on GitHub ↗

interface returns the typeId of the 'this' object at the given call stack level (0 for current) returns 0 if the function call at the given stack level is not a method

Source from the content-addressed store, hash-verified

5569// returns the typeId of the 'this' object at the given call stack level (0 for current)
5570// returns 0 if the function call at the given stack level is not a method
5571int asCContext::GetThisTypeId(asUINT stackLevel)
5572{
5573 asIScriptFunction *func = GetFunction(stackLevel);
5574 if( func == 0 ) return asINVALID_ARG;
5575
5576 if( func->GetObjectType() == 0 )
5577 return 0; // not in a method
5578
5579 // create a datatype
5580 asCDataType dt = asCDataType::CreateType((asCObjectType*)func->GetObjectType(), false);
5581
5582 // return a typeId from the data type
5583 return m_engine->GetTypeIdFromDataType(dt);
5584}
5585
5586// interface
5587// returns the 'this' object pointer at the given call stack level (0 for current)

Callers 2

PrintValueMethod · 0.80
ListMemberPropertiesMethod · 0.80

Calls 2

GetTypeIdFromDataTypeMethod · 0.80
GetObjectTypeMethod · 0.45

Tested by

no test coverage detected