Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
CArchive::WriteObject
CArchive                                    Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  Protected: void WriteObject( const CObject* pOb )
  throw( CFileException, CArchiveException );
 
  Parameter   Description
 
  <pOb>       A constant pointer to the object being stored.
 
  Remarks
 
  Stores the specified CObject to the archive. If the object contains
  pointers to other objects, they are serialized in turn.
 
  This protected function is normally called by the public CArchive
  insertion (<<) operator, overloaded for CObject. WriteObject, in turn,
  calls the Serialize function of the archived class.
 
  You must use the IMPLEMENT_SERIAL macro to enable archiving. WriteObject
  writes the ASCII class name to the archive. This class name is validated
  later during the load process. A special encoding scheme prevents
  unnecessary duplication of the class name for multiple objects of the
  class. This scheme also prevents redundant storage of objects that are
  targets of more than one pointer.
 
  The exact object encoding method (including the presence of the ASCII
  class name) is an implementation detail and could change in future
  versions of the library.
 
  NOTE: Finish creating, deleting, and updating all your objects before
        you begin to archive them. Your archive will be corrupted if you
        mix archiving with object modification.
 
  See Also
 
  CArchive::ReadObject
 
 
                                     -♦-