InitPersistentObject
TheInitPersistentObjectmethod initializes this newly created persistent object.
void InitPersistentObject (in ODStorageUnit storageUnit);
storageUnit- A reference to a storage unit of this persistent object.
DISCUSSION
Your part editor should never call this method directly; it is called automatically whenever a persistent object is created for the first time. Every existing OpenDoc subclass ofODPersistentObject(includingODPart) has an initialization method that calls the inheritedInitPersistentObjectmethod at the beginning of its implementation.For example, the initialization method of
ODPartis theInitPartmethod. When you call the draft'sCreatePartmethod to create a part of your class, that factory method calls your part'sInitPartmethod. Your part'sInitPartmethod should call the inheritedInitPartmethod, which calls theInitPersistentObjectmethod.The
InitPersistentObjectmethod is not called when a stored object is re-created. Instead, theInitPersistentObjectFromStoragemethod is called to restore the object to its state at the time it was last saved.SEE ALSO
TheODPart::InitPartmethod (page 528).
TheODPersistentObject::Externalizemethod (page 558).
TheODPersistentObject::InitPersistentObjectFromStoragemethod (page 561).
"The InitPart Method" on page 293 in OpenDoc Programmer's Guide.
"The InitPartFromStorage Method" on page 294 in OpenDoc Programmer's Guide.