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

Method deepClone

Engine/source/console/simSet.cpp:817–835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815//-----------------------------------------------------------------------------
816
817SimGroup* SimGroup::deepClone()
818{
819 // Clone the group object.
820
821 SimObject* object = Parent::deepClone();
822 SimGroup* group = dynamic_cast< SimGroup* >( object );
823 if( !group )
824 {
825 object->deleteObject();
826 return NULL;
827 }
828
829 // Clone all child objects.
830
831 for( iterator iter = begin(); iter != end(); ++ iter )
832 group->addObject( ( *iter )->deepClone() );
833
834 return group;
835}
836
837//-----------------------------------------------------------------------------
838

Callers 1

cloneSelectionMethod · 0.45

Calls 4

beginFunction · 0.85
endFunction · 0.85
deleteObjectMethod · 0.45
addObjectMethod · 0.45

Tested by

no test coverage detected