MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / MField

Method MField

Source/Engine/Scripting/Runtime/DotNet.cpp:1366–1399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1364}
1365
1366MField::MField(MClass* parentClass, void* handle, const char* name, void* type, int fieldOffset, MFieldAttributes attributes)
1367 : _handle(handle)
1368 , _type(type)
1369 , _fieldOffset(fieldOffset)
1370 , _parentClass(parentClass)
1371 , _name(parentClass->GetAssembly()->AllocString(name))
1372 , _hasCachedAttributes(false)
1373 , _attributes(&parentClass->GetAssembly()->Memory)
1374{
1375 switch (attributes & MFieldAttributes::FieldAccessMask)
1376 {
1377 case MFieldAttributes::Private:
1378 _visibility = MVisibility::Private;
1379 break;
1380 case MFieldAttributes::FamANDAssem:
1381 _visibility = MVisibility::PrivateProtected;
1382 break;
1383 case MFieldAttributes::Assembly:
1384 _visibility = MVisibility::Internal;
1385 break;
1386 case MFieldAttributes::Family:
1387 _visibility = MVisibility::Protected;
1388 break;
1389 case MFieldAttributes::FamORAssem:
1390 _visibility = MVisibility::ProtectedInternal;
1391 break;
1392 case MFieldAttributes::Public:
1393 _visibility = MVisibility::Public;
1394 break;
1395 default:
1396 CRASH;
1397 }
1398 _isStatic = (attributes & MFieldAttributes::Static) == MFieldAttributes::Static;
1399}
1400
1401MType* MField::GetType() const
1402{

Callers

nothing calls this directly

Calls 1

AllocStringMethod · 0.80

Tested by

no test coverage detected