VR-Forces 4.1 Class Documentation
msgHandler.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2002 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: msgHandler.h,v $ $Revision: 1.16 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtMsgHandler_H
13 #define DtMsgHandler_H
14 
15 #include "ngutil/ngutilDefines.h"
17 #include "ngutil/msgItem.h"
18 
20 #include <QtCore/QObject>
21 #include <QtCore/QString>
22 #include <QtCore/QStringList>
23 #include <QtCore/QHash>
24 
25 
26 
36 {
37  Q_OBJECT
38 public:
39  DtMsgHandler();
40  virtual ~DtMsgHandler();
41 
44  static void setDump( bool b );
45 
47  static void setOutputFile( const QString & filename, bool clear = false );
48 
50  static DtMsgHandler * defaultInstance();
51  static void cleanupDefaultInstance();
52 
54  static void generalMsg(const QString & msg,
55  const QString & source );
56  static void debug ( const QString & msg );
57  static void info ( const QString & msg );
58  static void verbose(const QString & msg );
59  static void warn ( const QString & msg );
60  static void config( const QString & msg );
61  static void error ( const QString & msg );
62  static void status( const QString & msg );
63 
66  static void info ( const char* cformat,...);
67  static void warn ( const char* cformat,...);
68 
69 public slots:
70  static void allowByDefault(bool);
71  static void addSource( const QString& source );
72  static void removeSource( const QString& source );
73 
74 signals:
75  void msgItem( const DtMsgItem & );
76 
77 protected:
78  static void printMsg( const QString & msg );
79  static void vargprint(char * updateBuff, const char * cformat, ...);
80 
81 protected:
82  static bool myIsDump;
83  static QString sOutputFile;
85 
86  static bool sAllowDefault;
87  static QHash<QString, QString> sSourceCollection;
88  static char myBuff[2048];
89 
90 };
91 
92 #endif
93 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)