]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/persist.h
bracket unused function
[wxWidgets.git] / include / wx / persist.h
index 02c9607c107b4af3adf0c6a3eda90fc01088bad8..68097fbcbeeb3f1698e650a61017ae417a1daddb 100644 (file)
@@ -161,7 +161,7 @@ private:
     bool m_doSave,
          m_doRestore;
 
-    DECLARE_NO_COPY_CLASS(wxPersistenceManager)
+    wxDECLARE_NO_COPY_CLASS(wxPersistenceManager);
 };
 
 // ----------------------------------------------------------------------------
@@ -218,7 +218,7 @@ protected:
 private:
     void * const m_obj;
 
-    DECLARE_NO_COPY_CLASS(wxPersistentObject)
+    wxDECLARE_NO_COPY_CLASS(wxPersistentObject);
 };
 
 // FIXME-VC6: VC6 has troubles with template methods of DLL-exported classes,
@@ -239,5 +239,15 @@ inline bool wxPersistentRegisterAndRestore(T *obj)
 
 }
 
+// A helper function which also sets the name for the (wxWindow-derived) object
+// before registering and restoring it.
+template <typename T>
+inline bool wxPersistentRegisterAndRestore(T *obj, const wxString& name)
+{
+    obj->SetName(name);
+
+    return wxPersistentRegisterAndRestore(obj);
+}
+
 #endif // _WX_PERSIST_H_