MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / set

Method set

Engine/source/console/simObject.h:1060–1080  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1058
1059 protected:
1060 void set(WeakRefBase::WeakReference * ref)
1061 {
1062 if( ref == this->mReference )
1063 return;
1064
1065 if( this->mReference )
1066 {
1067 // Auto-delete
1068 T* obj = this->getPointer();
1069 if ( this->mReference->getRefCount() == 2 && obj && obj->isAutoDeleted() )
1070 obj->deleteObject();
1071
1072 this->mReference->decRefCount();
1073 }
1074 this->mReference = NULL;
1075 if( ref )
1076 {
1077 this->mReference = ref;
1078 this->mReference->incRefCount();
1079 }
1080 }
1081
1082 void set(T * obj)
1083 {

Callers 15

SimObjectMethod · 0.45
unregisterObjectMethod · 0.45
_destroySelfMethod · 0.45
onAddMethod · 0.45
setSelectedMethod · 0.45
setLockedMethod · 0.45
setHiddenMethod · 0.45
ConsoleSetTypeFunction · 0.45
EngineSimpleTypeInfoMethod · 0.45
EngineStructTypeInfoMethod · 0.45
EngineClassTypeInfoMethod · 0.45

Calls 8

isAutoDeletedMethod · 0.80
getWeakReferenceMethod · 0.80
setFunction · 0.50
getPointerMethod · 0.45
getRefCountMethod · 0.45
deleteObjectMethod · 0.45
decRefCountMethod · 0.45
incRefCountMethod · 0.45

Tested by

no test coverage detected