persist.h File Reference

Classes

class  wxPersistenceManager
 Provides support for automatically saving and restoring object properties to persistent storage. More...
class  wxPersistentObject
 Base class for persistent object adapters. More...

Functions

template<class T >
wxPersistentObjectwxCreatePersistentObject (T *obj)
 Function used to create the correct persistent adapter for the given type of objects.
template<class T >
bool wxPersistentRegisterAndRestore (T *obj)
 A shorter synonym for wxPersistenceManager::RegisterAndRestore().

Function Documentation

template<class T >
wxPersistentObject* wxCreatePersistentObject ( T *  obj  )  [inline]

Function used to create the correct persistent adapter for the given type of objects.

To be precise, there is no such template function definition but there are overloads of wxCreatePersistentObject() taking different object types for all wxWidgets classes supporting persistence. And you may also define your own overloads to integrate your custom classes with wxWidgets persistence framework.

See also:
Defining Custom Persistent Windows

Include file:

#include <wx/persist.h> 
template<class T >
bool wxPersistentRegisterAndRestore ( T *  obj  )  [inline]

A shorter synonym for wxPersistenceManager::RegisterAndRestore().

This function simply calls wxPersistenceManager::RegisterAndRestore() but using it results in slightly shorter code as it calls wxPersistenceManager::Get() internally.

For the implementation reasons, this function mucst be used instead of the template method when using Microsoft Visual C++ 6 compiler.

Include file:

#include <wx/persist.h> 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



wxWidgets logo

[ top ]