Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CObject::Dump
CObject                                     Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  virtual void Dump( CDumpContext& dc ) const;
 
  Parameter   Description
 
  <dc>        The diagnostic dump context for dumping, usually afxDump.
 
  Remarks
 
  Dumps the contents of your object to a CDumpContext object.
 
  When you write your own class, you should override the Dump function to
  provide diagnostic services for yourself and other users of your class.
  The overridden Dump usually calls the Dump function of its base class
  before printing data members unique to the derived class. CObject::Dump
  prints the class name if your class uses the IMPLEMENT_DYNAMIC or
  IMPLEMENT_SERIAL macro.
 
  NOTE: Your Dump function should not print a newline at the end of its
        output.
 
  Dump calls make sense only in the Debug version of the Microsoft
  Foundation library. Bracket calls, function declarations, and function
  implementations with #ifdef _DEBUG/#endif statements for conditional
  compilation.
 
  Since Dump is a const function, you are not permitted to change the
  object state during the dump.
 
  The CDumpContext operator << calls Dump when a CObject pointer is
  inserted.
 
  Dump permits only "acyclic" dumping of objects. You can dump a list of
  objects, for example, but if one of the objects is the list itself, you
  will eventually overflow the stack.
 
  Example
 
     void CAge::Dump( CDumpContext &dc ) const
  {
         CObject::Dump( dc );
         dc << "Age = " << m_years;
  }
 
 
 
                                     -♦-