CDumpContext::operator <<
This operator inserts variables and objects into the dump context.
CDumpContext& operator <<(
LPCTSTR lpsz );
CDumpContext& operator <<(
LPCSTR lpsz );
CDumpContext& operator <<(
LPCWSTR lpsz);
CDumpContext& operator <<(
const void* lp );
CDumpContext& operator <<(
const CObject* pOb );
CDumpContext& operator <<(
const CObject& ob );
CDumpContext& operator <<(
BYTE by );
CDumpContext& operator <<(
WORD w );
CDumpContext& operator <<(
UINT u );
CDumpContext& operator <<(
LONG l );
CDumpContext& operator <<(
DWORD dw );
CDumpContext& operator <<(
float f );
CDumpContext& operator <<(
double d );
CDumpContext& operator <<(
int n );
Return Value
A CDumpContext reference. Using the return value, you can write multiple insertions on a single line of source code.
Remarks
The insertion operator is overloaded for CObject pointers as well as for most primitive types. A pointer to character results in a dump of string contents; a pointer to void results in a hexadecimal dump of the address only. A LONGLONG results in a dump of a 64-bit signed integer. A ULONGLONG results in a dump of a 64-bit unsigned integer.
If you use the IMPLEMENT_DYNAMIC or IMPLEMENT_SERIAL macro in the implementation of your class, the insertion operator, through CObject::Dump, prints the name of your CObject-derived class. See RUNTIME_CLASS for information about these macros. Otherwise, it prints CObject. If you override the Dump function of the class, you can provide a more meaningful output of the contents of the object instead of a hexadecimal dump.
Example
// Example for the CDumpContext::operator <<. extern CObList li; CString s = "test"; int i = 7; long lo = 1000000000L; LONGLONG lolo = 12345678901234i64; afxDump << "list=" << &li << "string=" << s << "int=" << i << "long=" << lo << "LONGLONG=" << lolo << "\n";
Requirements
** Windows CE versions:** 1.0 and later
Header file: Declared in Afx.h
Platform: H/PC Pro, Palm-sive PC, Pocket PC