00001 /* 00002 * $Id: signalSlots.cpp,v 1.1 2003/09/05 04:20:12 jmk Exp $ 00003 */ 00004 /////////////////////////////////////////////////////////////////////////// 00005 // _____________ ______________________ __ __ _____ 00006 // / ________ | | ___ ________ / | \ / \ | 00007 // | | | |_ | |_ | | / / \__ | | 00008 // | | ___ | || | || | | / / | | | 00009 // | | | \ | || | || | | / / \__/ \__/ __|__ 00010 // | | |_@ || || | || | | / / Institute 00011 // | |___/ || ||_| || | | / /_____________________ 00012 // \_______/ \______/ | |__| /___________________________ 00013 // | |__| | 00014 // \______/ 00015 // University of Utah 00016 // 2002 00017 // 00018 // By Joe Kniss, with help from Yarden Livnat 00019 /////////////////////////////////////////////////////////////////////////// 00020 00021 //signalSlots.cpp 00022 00023 00024 #include "signal.h" 00025 #include "signalCall.h" 00026 #include <algorithm> 00027 00028 using namespace std; 00029 using namespace gutz; 00030 00031 SignalTracker::~SignalTracker() 00032 { 00033 for(int i = 0; i < int(_sigs.size()); ++i) 00034 _sigs[i]->detatchSlotIF(callee); 00035 } 00036 00037 void SignalTracker::detatchSignalIF(SignalIF *sig) 00038 { 00039 SignalPVecIter i = _sigs.begin(); 00040 while( (i = find(_sigs.begin(),_sigs.end(),sig)) != _sigs.end()) 00041 { 00042 (*i) = 0; 00043 _sigs.erase(i); 00044 } 00045 } 00046