kdecore Library API Documentation

kdbgstream Class Reference
[Debug message generators]

kdbgstream is a text stream that allows you to print debug messages. More...

#include <kdebug.h>

List of all members.

Public Member Functions

 kdbgstream (unsigned int _area, unsigned int _level, bool _print=true)
 kdbgstream (const char *initialString, unsigned int _area, unsigned int _level, bool _print=true)
 kdbgstream (kdbgstream &str)
 kdbgstream (const kdbgstream &str)
kdbgstreamoperator<< (bool i)
kdbgstreamoperator<< (short i)
kdbgstreamoperator<< (unsigned short i)
kdbgstreamoperator<< (char i)
kdbgstreamoperator<< (unsigned char i)
kdbgstreamoperator<< (int i)
kdbgstreamoperator<< (unsigned int i)
kdbgstreamoperator<< (long i)
kdbgstreamoperator<< (unsigned long i)
void flush ()
kdbgstreamoperator<< (const QString &string)
kdbgstreamoperator<< (const char *string)
kdbgstreamoperator<< (const QCString &string)
kdbgstreamoperator<< (const void *p)
kdbgstreamoperator<< (KDBGFUNC f)
kdbgstreamoperator<< (double d)
kdbgstreamform (const char *format,...)
kdbgstreamoperator<< (const QWidget *widget)
kdbgstreamoperator<< (QWidget *widget)
kdbgstreamoperator<< (const QDateTime &dateTime)
kdbgstreamoperator<< (const QDate &date)
kdbgstreamoperator<< (const QTime &time)
kdbgstreamoperator<< (const QPoint &point)
kdbgstreamoperator<< (const QSize &size)
kdbgstreamoperator<< (const QRect &rect)
kdbgstreamoperator<< (const QRegion &region)
kdbgstreamoperator<< (const KURL &url)
kdbgstreamoperator<< (const QStringList &list)
kdbgstreamoperator<< (const QColor &color)
kdbgstreamoperator<< (const QPen &pen)
kdbgstreamoperator<< (const QBrush &brush)


Detailed Description

kdbgstream is a text stream that allows you to print debug messages.

Using the overloaded "<<" operator you can send messages. Usually you do not create the kdbgstream yourself, but use kdDebug() kdWarning(), kdError() or kdFatal to obtain one.

Example:

int i = 5; kdDebug() << "The value of i is " << i << endl;
See also:
kndbgstream

Definition at line 76 of file kdebug.h.


Constructor & Destructor Documentation

kdbgstream::kdbgstream kdbgstream str  )  [inline]
 

Copy constructor.

Definition at line 86 of file kdebug.h.

References output, and QString::truncate().


Member Function Documentation

kdbgstream& kdbgstream::operator<< bool  i  )  [inline]
 

Prints the given value.

Parameters:
i the boolean to print (as "true" or "false")
Returns:
this stream

Definition at line 96 of file kdebug.h.

References operator<<().

Referenced by operator<<().

kdbgstream& kdbgstream::operator<< short  i  )  [inline]
 

Prints the given value.

Parameters:
i the short to print
Returns:
this stream

Definition at line 106 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream& kdbgstream::operator<< unsigned short  i  )  [inline]
 

Prints the given value.

Parameters:
i the unsigned short to print
Returns:
this stream

Definition at line 116 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream & kdbgstream::operator<< char  i  ) 
 

Prints the given value.

Parameters:
i the char to print
Returns:
this stream

Definition at line 358 of file kdebug.cpp.

References flush().

kdbgstream& kdbgstream::operator<< unsigned char  i  )  [inline]
 

Prints the given value.

Parameters:
i the unsigned char to print
Returns:
this stream

Definition at line 132 of file kdebug.h.

References operator<<().

kdbgstream& kdbgstream::operator<< int  i  )  [inline]
 

Prints the given value.

Parameters:
i the int to print
Returns:
this stream

Definition at line 140 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream& kdbgstream::operator<< unsigned int  i  )  [inline]
 

Prints the given value.

Parameters:
i the unsigned int to print
Returns:
this stream

Definition at line 150 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream& kdbgstream::operator<< long  i  )  [inline]
 

Prints the given value.

Parameters:
i the long to print
Returns:
this stream

Definition at line 160 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream& kdbgstream::operator<< unsigned long  i  )  [inline]
 

Prints the given value.

Parameters:
i the unsigned long to print
Returns:
this stream

Definition at line 170 of file kdebug.h.

References operator<<(), and QString::setNum().

void kdbgstream::flush  ) 
 

Flushes the output.

Definition at line 332 of file kdebug.cpp.

References QString::isEmpty(), and QString::local8Bit().

Referenced by KGlobal::flush(), and operator<<().

kdbgstream& kdbgstream::operator<< const QString string  )  [inline]
 

Prints the given value.

Parameters:
string the string to print
Returns:
this stream

Definition at line 185 of file kdebug.h.

References QString::at(), flush(), QString::length(), and operator<<().

kdbgstream& kdbgstream::operator<< const char *  string  )  [inline]
 

Prints the given value.

Parameters:
string the string to print
Returns:
this stream

Definition at line 197 of file kdebug.h.

References QString::at(), flush(), QString::length(), and operator<<().

kdbgstream& kdbgstream::operator<< const QCString string  )  [inline]
 

Prints the given value.

Parameters:
string the string to print
Returns:
this stream

Definition at line 209 of file kdebug.h.

References operator<<().

kdbgstream& kdbgstream::operator<< const void *  p  )  [inline]
 

Prints the given value.

Parameters:
p a pointer to print (in number form)
Returns:
this stream

Definition at line 218 of file kdebug.h.

References form(), and operator<<().

kdbgstream& kdbgstream::operator<< KDBGFUNC  f  )  [inline]
 

Invokes the given function.

Parameters:
f the function to invoke
Returns:
the return value of f

Definition at line 227 of file kdebug.h.

References operator<<().

kdbgstream& kdbgstream::operator<< double  d  )  [inline]
 

Prints the given value.

Parameters:
d the double to print
Returns:
this stream

Definition at line 236 of file kdebug.h.

References operator<<(), and QString::setNum().

kdbgstream & kdbgstream::form const char *  format,
  ...
 

Prints the string format which can contain printf-style formatted values.

Parameters:
format the printf-style format
Returns:
this stream

Definition at line 339 of file kdebug.cpp.

References form().

Referenced by form(), and operator<<().

kdbgstream & kdbgstream::operator<< const QWidget widget  ) 
 

Operator to print out basic information about a QWidget.

Output of class names only works if the class is moc'ified.

Parameters:
widget the widget to print
Returns:
this stream

Definition at line 375 of file kdebug.cpp.

References QString::at(), flush(), QString::length(), and QString::setNum().

kdbgstream & kdbgstream::operator<< const QDateTime dateTime  ) 
 

Prints the given value.

Parameters:
dateTime the datetime to print
Returns:
this stream

Definition at line 415 of file kdebug.cpp.

References operator<<(), and QDateTime::toString().

kdbgstream & kdbgstream::operator<< const QDate date  ) 
 

Prints the given value.

Parameters:
date the date to print
Returns:
this stream

Definition at line 419 of file kdebug.cpp.

References operator<<(), and QDate::toString().

kdbgstream & kdbgstream::operator<< const QTime time  ) 
 

Prints the given value.

Parameters:
time the time to print
Returns:
this stream

Definition at line 424 of file kdebug.cpp.

References operator<<(), and QTime::toString().

kdbgstream & kdbgstream::operator<< const QPoint point  ) 
 

Prints the given value.

Parameters:
point the point to print
Returns:
this stream

Definition at line 428 of file kdebug.cpp.

References operator<<(), QPoint::x(), and QPoint::y().

kdbgstream & kdbgstream::operator<< const QSize size  ) 
 

Prints the given value.

Parameters:
size the QSize to print
Returns:
this stream

Definition at line 432 of file kdebug.cpp.

References QSize::height(), operator<<(), and QSize::width().

kdbgstream & kdbgstream::operator<< const QRect rect  ) 
 

Prints the given value.

Parameters:
rect the QRect to print
Returns:
this stream

Definition at line 436 of file kdebug.cpp.

References QRect::height(), operator<<(), QRect::width(), QRect::x(), and QRect::y().

kdbgstream & kdbgstream::operator<< const QRegion region  ) 
 

Prints the given value.

Parameters:
region the QRegion to print
Returns:
this stream

Definition at line 440 of file kdebug.cpp.

References operator<<(), QRegion::rects(), and QMemArray::size().

kdbgstream & kdbgstream::operator<< const KURL url  ) 
 

Prints the given value.

Parameters:
url the url to print
Returns:
this stream

Definition at line 450 of file kdebug.cpp.

References operator<<(), and KURL::prettyURL().

kdbgstream & kdbgstream::operator<< const QStringList list  ) 
 

Prints the given value.

Parameters:
list the stringlist to print
Returns:
this stream

Definition at line 454 of file kdebug.cpp.

References QStringList::join(), and operator<<().

kdbgstream & kdbgstream::operator<< const QColor color  ) 
 

Prints the given value.

Parameters:
color the color to print
Returns:
this stream

Definition at line 461 of file kdebug.cpp.

References QColor::isValid(), QColor::name(), and operator<<().

kdbgstream & kdbgstream::operator<< const QPen pen  ) 
 

Prints the given value.

Parameters:
pen the pen to print
Returns:
this stream
Since:
3.2

Definition at line 468 of file kdebug.cpp.

References QPen::capStyle(), QPen::color(), operator<<(), QPen::style(), and QPen::width().

kdbgstream & kdbgstream::operator<< const QBrush brush  ) 
 

Prints the given value.

Parameters:
brush the brush to print
Returns:
this stream

Definition at line 492 of file kdebug.cpp.

References QBrush::color(), operator<<(), QBrush::pixmap(), and QBrush::style().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:48:30 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003