[Libufo-commits] ufo-0.5/include/ufo uobject.hpp,1.14,1.15
Status: Beta
Brought to you by:
schmidtjf
|
From: Johannes S. <sch...@us...> - 2005-08-31 15:31:06
|
Update of /cvsroot/libufo/ufo-0.5/include/ufo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21391/include/ufo Modified Files: uobject.hpp Log Message: Added sigDestroyed Signal. Fixed releasePointer to allow multiple calls to releasePointer after multiple calls to trackPointer by removing only the first occurence of the pointer. Index: uobject.hpp =================================================================== RCS file: /cvsroot/libufo/ufo-0.5/include/ufo/uobject.hpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** uobject.hpp 21 May 2005 15:18:16 -0000 1.14 --- uobject.hpp 31 Aug 2005 15:30:31 -0000 1.15 *************** *** 33,39 **** #include "ucollectable.hpp" ! //#include "usignaldefs.h" ! //#include "signals/ufo_signals.hpp" ! //#include "signals/usignal.hpp" #include <string> --- 33,37 ---- #include "ucollectable.hpp" ! #include "signals/usignal.hpp" #include <string> *************** *** 234,238 **** /** Increases the reference count of c by 1 and adds c to the internal ! * memory tracking list. Does nothing if c is * @param c The pointer this widget should track. May be NULL. * @return The added object or NULL on failure. --- 232,239 ---- /** Increases the reference count of c by 1 and adds c to the internal ! * memory tracking list. Does nothing if c is NULL. ! * You may call trackPointer several times with the same pointer as ! * argument. ! * @see releasePointer * @param c The pointer this widget should track. May be NULL. * @return The added object or NULL on failure. *************** *** 240,244 **** UCollectable * trackPointer(UCollectable * c); /** Increases the reference count of c by 1 and adds c to the internal ! * memory tracking list. * @param c The pointer this widget should track. May be NULL. * @return The added object or NULL on failure. --- 241,248 ---- UCollectable * trackPointer(UCollectable * c); /** Increases the reference count of c by 1 and adds c to the internal ! * memory tracking list. Does nothing if c is NULL. ! * You may call trackPointer several times with the same pointer as ! * argument. ! * @see releasePointer * @param c The pointer this widget should track. May be NULL. * @return The added object or NULL on failure. *************** *** 246,251 **** const UCollectable * trackPointer(const UCollectable * c); ! /** If c is in the memory tracking list, decreases the reference count ! * of c by 1 and removes it from the memory tracking list. * @param c The pointer this widget should remove from its memory * tracking list. May be NULL. --- 250,256 ---- const UCollectable * trackPointer(const UCollectable * c); ! /** Removes the first occurence of c from the memory tracking list and ! * decreases its reference count by 1. ! * @see trackPointer * @param c The pointer this widget should remove from its memory * tracking list. May be NULL. *************** *** 253,258 **** */ bool releasePointer(UCollectable * c); ! /** If c is in the memory tracking list, decreases the reference count ! * of c by 1 and removes it from the memory tracking list. * @param c The pointer this widget should remove from its memory * tracking list. May be NULL. --- 258,264 ---- */ bool releasePointer(UCollectable * c); ! /** Removes the first occurence of c from the memory tracking list and ! * decreases its reference count by 1. ! * @see trackPointer * @param c The pointer this widget should remove from its memory * tracking list. May be NULL. *************** *** 285,288 **** --- 291,304 ---- std::list<const UCollectable*> m_pointers; + + public: // Public Signals + /** This signal is fired immediately before this object is destroyed + * Please note that all information about subclass features is already + * destroyed. + */ + USignal1<UObject*> & sigDestroyed(); + + private: // Private Signals + USignal1<UObject*> m_sigDestroyed; }; *************** *** 318,321 **** --- 334,343 ---- } + // signals + inline USignal1<UObject*> & + UObject::sigDestroyed() { + return m_sigDestroyed; + } + } // namespace ufo |