2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tracker.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxTrackable
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxTrackable
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-05-20 07:48:30 +00: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 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@code
|
|
|
|
class MyClass: public Foo, public wxTrackable
|
|
|
|
{
|
2008-05-20 07:48:30 +00:00
|
|
|
// whatever
|
2008-03-08 13:52:38 +00:00
|
|
|
}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-05-20 07:48:30 +00:00
|
|
|
typedef wxWeakRef<MyClass> MyClassRef;
|
2008-03-08 13:52:38 +00:00
|
|
|
@endcode
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxbase}
|
2008-05-20 07:48:30 +00:00
|
|
|
@category{smartpointers}
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
class wxTrackable
|
2008-03-08 13:52:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|