blob: a1e59cce11c5066a1d639950beeb2bbba32965d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// wxAutoDialog.h
#ifndef i_wxAutoDialog_h
#define i_wxAutoDialog_h
template <class D>
class WxAutoDialog
{
public:
explicit WxAutoDialog( D* dialog) throw():dialog( dialog) {}
~WxAutoDialog() throw() { dialog->Destroy(); }
D* operator->() const throw() { return dialog; }
protected:
D* dialog;
private:
// Unimplemented
WxAutoDialog( const WxAutoDialog<D>&);
WxAutoDialog<D>& operator=( const WxAutoDialog<D>&);
};
#endif
|