comparison base/Debug.h @ 874:862fe7b20df7 tony_integration

Merge from tonioni branch
author Chris Cannam
date Tue, 28 Jan 2014 15:01:54 +0000
parents 0b15c9328003
children 16dc7307d43a
comparison
equal deleted inserted replaced
862:786ee8d1f30e 874:862fe7b20df7
17 #define _DEBUG_H_ 17 #define _DEBUG_H_
18 18
19 #include <QDebug> 19 #include <QDebug>
20 #include <QTextStream> 20 #include <QTextStream>
21 21
22 #include <vamp-hostsdk/RealTime.h>
23
22 #include <string> 24 #include <string>
23 #include <iostream> 25 #include <iostream>
24 26
25 class QString; 27 class QString;
26 class QUrl; 28 class QUrl;
36 #ifndef NDEBUG 38 #ifndef NDEBUG
37 39
38 extern QDebug &getSVDebug(); 40 extern QDebug &getSVDebug();
39 41
40 #define SVDEBUG getSVDebug() 42 #define SVDEBUG getSVDebug()
43
44 inline QDebug &operator<<(QDebug &d, const Vamp::RealTime &rt) {
45 d << rt.toString();
46 return d;
47 }
41 48
42 template <typename T> 49 template <typename T>
43 inline QDebug &operator<<(QDebug &d, const T &t) { 50 inline QDebug &operator<<(QDebug &d, const T &t) {
44 QString s; 51 QString s;
45 QTextStream ts(&s); 52 QTextStream ts(&s);