CDumpContext::operator <<

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 );

Return Value

A CDumpContext reference. Using the return value, you can write multiple insertions on a single line of source code.

Remarks

Outputs the specified data to the dump context.

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.

If you use the IMPLEMENT_DYNAMIC or IMPLEMENT_SERIAL macro in the implementation of your class, then the insertion operator, through CObject::Dump, will print the name of your CObject-derived class. Otherwise, it will print CObject. If you override the Dump function of the class, then you can provide a more meaningful output of the object’s contents instead of a hexadecimal dump.

Example

//example for CDumpContext::operator <<
extern CObList li;
CString s = "test";
int i = 7;
long lo = 1000000000L;
afxDump << "list=" << &li << "string="
        << s << "int=" << i << "long=" << lo << "\n";

CDumpContext OverviewClass MembersHierarchy Chart