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

Method GetObjectProperty

sdk/angelscript/source/as_builder.cpp:1218–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216
1217#ifndef AS_NO_COMPILER
1218asCObjectProperty *asCBuilder::GetObjectProperty(asCDataType &obj, const char *prop)
1219{
1220 asASSERT(CastToObjectType(obj.GetTypeInfo()) != 0);
1221
1222 // TODO: optimize: Improve linear search
1223 asCArray<asCObjectProperty *> &props = CastToObjectType(obj.GetTypeInfo())->properties;
1224 for( asUINT n = 0; n < props.GetLength(); n++ )
1225 {
1226 if( props[n]->name == prop )
1227 {
1228 if( module->m_accessMask & props[n]->accessMask )
1229 return props[n];
1230 else
1231 return 0;
1232 }
1233 }
1234
1235 return 0;
1236}
1237#endif
1238
1239bool asCBuilder::DoesGlobalPropertyExist(const char *prop, asSNameSpace *ns, asCGlobalProperty **outProp, sGlobalVariableDescription **outDesc, bool *isAppProp)

Callers 3

SymbolLookupMemberMethod · 0.80
CompileVariableAccessMethod · 0.80

Calls 3

CastToObjectTypeFunction · 0.85
GetTypeInfoMethod · 0.80
GetLengthMethod · 0.45

Tested by

no test coverage detected