kdecore Library API Documentation

kdbgstream Class Reference

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

#include <kdebug.h>

List of all members.

Public Methods

 kdbgstream (kdbgstream &str)
 Copy constructor.

kdbgstream & operator<< (bool i)
 Prints the given value.

kdbgstream & operator<< (short i)
 Prints the given value.

kdbgstream & operator<< (unsigned short i)
 Prints the given value.

kdbgstream & operator<< (char i)
 Prints the given value.

kdbgstream & operator<< (unsigned char i)
 Prints the given value.

kdbgstream & operator<< (int i)
 Prints the given value.

kdbgstream & operator<< (unsigned int i)
 Prints the given value.

kdbgstream & operator<< (long i)
 Prints the given value.

kdbgstream & operator<< (unsigned long i)
 Prints the given value.

void flush ()
 Flushes the output.

kdbgstream & operator<< (const QString &string)
 Prints the given value.

kdbgstream & operator<< (const char *string)
 Prints the given value.

kdbgstream & operator<< (const QCString &string)
 Prints the given value.

kdbgstream & operator<< (const void *p)
 Prints the given value.

kdbgstream & operator<< (KDBGFUNC f)
 Invokes the given function.

kdbgstream & operator<< (double d)
 Prints the given value.

kdbgstream & form (const char *format,...)
 Prints the string format which can contain printf-style formatted values.

kdbgstream & operator<< (QWidget *widget)
 Operator to print out basic information about a QWidget.


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 54 of file kdebug.h.


Constructor & Destructor Documentation

kdbgstream::kdbgstream (  kdbgstream &    str )  [inline]
 

Copy constructor.

Definition at line 64 of file kdebug.h.


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 74 of file kdebug.h.

References QString::fromLatin1().

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

Prints the given value.

Parameters:
i  the short to print
Returns:
this stream

Definition at line 84 of file kdebug.h.

References 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 94 of file kdebug.h.

References QString::setNum().

kdbgstream & kdbgstream::operator<< (  char    i ) 
 

Prints the given value.

Parameters:
i  the char to print
Returns:
this stream

Definition at line 349 of file kdebug.cpp.

References flush(), and QString::number().

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

Prints the given value.

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

Definition at line 110 of file kdebug.h.

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

Prints the given value.

Parameters:
i  the int to print
Returns:
this stream

Definition at line 118 of file kdebug.h.

References 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 128 of file kdebug.h.

References QString::setNum().

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

Prints the given value.

Parameters:
i  the long to print
Returns:
this stream

Definition at line 138 of file kdebug.h.

References 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 148 of file kdebug.h.

References QString::setNum().

void kdbgstream::flush (    ) 
 

Flushes the output.

Definition at line 323 of file kdebug.cpp.

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

Referenced by operator<<().

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

Prints the given value.

Parameters:
string  the string to print
Returns:
this stream

Definition at line 162 of file kdebug.h.

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

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

Prints the given value.

Parameters:
string  the string to print
Returns:
this stream

Definition at line 174 of file kdebug.h.

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

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

Prints the given value.

Parameters:
string  the string to print
Returns:
this stream

Definition at line 186 of file kdebug.h.

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 195 of file kdebug.h.

References form().

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 204 of file kdebug.h.

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

Prints the given value.

Parameters:
d  the double to print
Returns:
this stream

Definition at line 213 of file kdebug.h.

References 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 330 of file kdebug.cpp.

Referenced by operator<<().

kdbgstream & kdbgstream::operator<< (  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 361 of file kdebug.cpp.

References QString::at(), flush(), QWidget::height(), QString::length(), QString::setNum(), QWidget::width(), QWidget::x(), and QWidget::y().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.3.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Feb 28 02:48:42 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001