Share via


CDumpContext::operator <<

Genera los datos especificados en el contexto de volcado de memoria.

CDumpContext& operator <<(
   const CObject* pOb 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   const CObject& ob 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   LPCTSTR lpsz 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   const void* lp 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   BYTE by 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   WORD w 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   DWORD dw 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   int n 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   double d 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   float f 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   LONG l 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   UINT u 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   LPCWSTR lpsz 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   LPCSTR lpsz 
);
throw(
   CFileException* 
);
CDumpContext& operator <<(
   LONGLONG n 
);
CDumpContext& operator <<(
   ULONGLONG n 
);
CDumpContext& operator <<( 
   HWND h 
);
CDumpContext& operator <<( 
HDC h 
);
CDumpContext& operator <<( 
HMENU h 
);
CDumpContext& operator <<( 
HACCEL h 
);
CDumpContext& operator <<( 
HFONT h 
);

Valor devuelto

Referencia CDumpContext.Utilice el valor devuelto, puede escribir inserciones de una sola línea de código fuente.

Comentarios

Sobrecarga el operador de inserción para punteros de CObject así como para la mayoría de los tipos primitivos.Un puntero al carácter produce un volcado del contenido de la cadena; un puntero a void produce un volcado hexadecimal de dirección sólo.LONGLONG produce un volcado de un entero con signo de 64 bits; ULONGLONG produce un volcado de un entero de 64 bits sin signo.

Si utiliza IMPLEMENT_DYNAMIC o macro de IMPLEMENT_SERIAL en la implementación de la clase, el operador de inserción, con CObject::Dump, imprimir el nombre de CObject- clase derivada.si no, imprimirá CObject.Si reemplaza la función de Dump de la clase, puede proporcionar una salida más significativa del contenido del objeto en lugar de un volcado de memoria hexadecimal.

Ejemplo

#if _DEBUG
   CStringList li;
   li.AddHead(_T("item 0"));
   li.AddHead(_T("item 1"));
   CString s = _T("test");
   int i = 7;
   long lo = 1000000000L;
   LONGLONG lolo = 12345678901234i64;
   afxDump << _T("list=") << &li << _T("string=")
      << s << _T("int=") << i << _T("long=") << lo 
      << _T("LONGLONG=") << lolo << _T("\n");
#endif

Requisitos

encabezado: afx.h

Vea también

Referencia

Clase de CDumpContext

Gráfico de jerarquía