template< class T >
class IPersistPropertyBagImpl
Parameters
T Your class, derived from IPersistPropertyBagImpl.
The IPersistPropertyBag interface derives from IPersist and allows an object to save its properties to a client-supplied property bag. Class IPersistPropertyBagImpl provides a default implementation of this interface and implements IUnknown by sending information to the dump device in debug builds.
IPersistPropertyBag works in conjunction with IPropertyBag and IErrorLog. These latter two interfaces must be implemented by the client. Through IPropertyBag, the client saves and loads the object's individual properties. Through IErrorLog, both the object and the client can report any errors encountered.
Related Articles ATL Tutorial, Creating an ATL Project
#include <atlctl.h>
See Also BEGIN_PROPERTY_MAP, IPersistPropertyBag, IPropertyBag, and IErrorLog in the Win32 SDK
IPersist Methods | |
GetClassID | Retrieves the object's CLSID. |
IPersistPropertyBag Methods | |
InitNew | Initializes a newly created object. The ATL implementation returns S_OK. |
Load | Loads the object's properties from a client-supplied property bag. |
Save | Saves the object's properties into a client-supplied property bag. |
HRESULT GetClassID( CLSID *pClassID );
See IPersist::GetClassID in the Win32 SDK.
IPersistPropertyBagImpl Overview | Class Members
HRESULT InitNew( );
See IPersistPropertyBag::InitNew in the Win32 SDK.
Remarks
ATL's implementation of InitNew simply returns S_OK.
IPersistPropertyBagImpl Overview | Class Members
HRESULT Load( LPPROPERTYBAG pPropBag, LPERRORLOG pErrorLog );
See IPersistPropertyBag::Load in the Win32 SDK.
Remarks
ATL's implementation of Load uses the object's property map to retrieve the properties from pPropBag.
IPersistPropertyBagImpl Overview | Class Members
See Also BEGIN_PROPERTY_MAP, IPersistPropertyBagImpl::InitNew, IPersistPropertyBagImpl::Save, IPropertyBag and IErrorLog in the Win32 SDK
HRESULT Save( LPPROPERTYBAG pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties );
See IPersistPropertyBag::Save in the Win32 SDK.
Remarks
ATL's implementation of Save uses the object's property map to save the properties to pPropBag. By default, this method saves all properties, regardless of the value of fSaveAllProperties.
IPersistPropertyBagImpl Overview | Class Members
See Also BEGIN_PROPERTY_MAP, IPersistPropertyBagImpl::Load, IPropertyBag in the Win32 SDK