summaryrefslogtreecommitdiffstats
path: root/libk3bdevice/k3bdebug.cpp
blob: 56dc1a0d71dfa14f878202281a0f7af0051b01b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
 *
 * $Id: k3bemptydiscwaiter.cpp 606691 2006-11-21 12:15:21Z trueg $
 * Copyright (C) 2006 Sebastian Trueg <trueg@k3b.org>
 *
 * This file is part of the K3b project.
 * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * See the file "COPYING" for the exact licensing terms.
 */

#include "k3bdebug.h"

#include <stdio.h>


K3bDebug::K3bDebug()
{
}


K3bDebug::~K3bDebug()
{
}


K3bDebug& K3bDebug::operator<<( int i )
{
  fprintf( stderr, "%i", i );
  return *this;
}


K3bDebug& K3bDebug::operator<<( long l )
{
  fprintf( stderr, "%li", l );
  return *this;
}


K3bDebug& K3bDebug::operator<<( unsigned int i )
{
  fprintf( stderr, "%u", i );
  return *this;
}


K3bDebug& K3bDebug::operator<<( unsigned long l )
{
  fprintf( stderr, "%lu", l );
  return *this;
}


K3bDebug& K3bDebug::operator<<( unsigned long long l )
{
  fprintf( stderr, "%llu", l );
  return *this;
}


K3bDebug& K3bDebug::operator<<( char c )
{
  fprintf( stderr, "%c", c );
  return *this;
}


K3bDebug& K3bDebug::operator<<( float f )
{
  fprintf( stderr, "%f", f );
  return *this;
}


K3bDebug& K3bDebug::operator<<( double d )
{
  fprintf( stderr, "%f", d );
  return *this;
}


K3bDebug& K3bDebug::operator<<( const TQString& s )
{
  fprintf( stderr, "%s", s.utf8().data() );
  return *this;
}


K3bDebug& K3bDebug::operator<<( const TQCString& s )
{
  fprintf( stderr, "%s", s.data() );
  return *this;
}


K3bDebug& K3bDebug::operator<<( const char* s )
{
  fprintf( stderr, "%s", s );
  return *this;
}


K3bDebug& K3bDebug::operator<<( const K3b::Msf& msf )
{
  return *this << msf.toString();
}


K3bDebug& K3bDebug::operator<<( K3BDBGFUNC f )
{
  return f( *this );
}


K3bDebug& K3bDebug::k3bDebug()
{
  static K3bDebug s_debug;
  return s_debug;
}



K3bDebug& k3bDebug()
{
  return K3bDebug::k3bDebug();
}


K3bDebug& endl( K3bDebug& s )
{
  return s << '\n';
}