Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / utils / wxNamingViewer / wxAutoDialog.h
blob51292dc2ddb5fa0942753adb850f75cb19a924bf
1 // wxAutoDialog.h
3 #ifndef i_wxAutoDialog_h
4 #define i_wxAutoDialog_h
6 template <class D>
7 class WxAutoDialog
9 public:
10 explicit WxAutoDialog( D* dialog) noexcept:dialog( dialog) {}
11 ~WxAutoDialog() noexcept { dialog->Destroy(); }
13 D* operator->() const noexcept { return dialog; }
15 protected:
16 D* dialog;
18 private:
19 // Unimplemented
20 WxAutoDialog( const WxAutoDialog<D>&);
21 WxAutoDialog<D>& operator=( const WxAutoDialog<D>&);
24 #endif