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

Method RegisterDefaultArrayType

sdk/angelscript/source/as_scriptengine.cpp:3465–3480  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

3463
3464// interface
3465int asCScriptEngine::RegisterDefaultArrayType(const char *type)
3466{
3467 asCBuilder bld(this, 0);
3468 asCDataType dt;
3469 int r = bld.ParseDataType(type, &dt, defaultNamespace);
3470 if( r < 0 ) return r;
3471
3472 if( dt.GetTypeInfo() == 0 ||
3473 !(dt.GetTypeInfo()->GetFlags() & asOBJ_TEMPLATE) )
3474 return asINVALID_TYPE;
3475
3476 defaultArrayObjectType = CastToObjectType(dt.GetTypeInfo());
3477 defaultArrayObjectType->AddRefInternal();
3478
3479 return 0;
3480}
3481
3482// interface
3483int asCScriptEngine::GetDefaultArrayTypeId() const

Callers 2

ConfigEngineFromStreamFunction · 0.80
RegisterScriptArrayFunction · 0.80

Calls 5

CastToObjectTypeFunction · 0.85
GetTypeInfoMethod · 0.80
GetFlagsMethod · 0.80
ParseDataTypeMethod · 0.45
AddRefInternalMethod · 0.45

Tested by

no test coverage detected