2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tracker.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxTrackable
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxTrackable
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-05-20 03:48:30 -04:00
|
|
|
Add-on base class for a trackable object. This class maintains an internal
|
|
|
|
linked list of classes of type wxTrackerNode and calls OnObjectDestroy() on
|
|
|
|
them if this object is destroyed. The most common usage is by using the
|
|
|
|
wxWeakRef<T> class template which automates this. This class has no public
|
|
|
|
API. Its only use is by deriving another class from it to make it trackable.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@code
|
|
|
|
class MyClass: public Foo, public wxTrackable
|
|
|
|
{
|
2008-05-20 03:48:30 -04:00
|
|
|
// whatever
|
2008-03-08 08:52:38 -05:00
|
|
|
}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-05-20 03:48:30 -04:00
|
|
|
typedef wxWeakRef<MyClass> MyClassRef;
|
2008-03-08 08:52:38 -05:00
|
|
|
@endcode
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
2008-05-20 03:48:30 -04:00
|
|
|
@category{smartpointers}
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxTrackable
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|