Panda3D
pandaLogger.h
1 // Filename: pandaLogger.h
2 // Created by: rdb (05May11)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PANDALOGGER_H
16 #define PANDALOGGER_H
17 
18 #include "config_assimp.h"
19 
20 #include "Logger.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PandaLogger
24 // Description : Custom implementation of Assimp::Logger. It
25 // simply wraps around the assimp_cat methods.
26 ////////////////////////////////////////////////////////////////////
27 class PandaLogger : public Assimp::Logger {
28 public:
29  static void set_default();
30 
31 protected:
32  INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
33  return false;
34  };
35  INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
36  return false;
37  };
38 
39  void OnDebug(const char *message);
40  void OnError(const char *message);
41  void OnInfo(const char *message);
42  void OnWarn(const char *message);
43 
44 private:
45  static PandaLogger *_ptr;
46 };
47 
48 #endif
Custom implementation of Assimp::Logger.
Definition: pandaLogger.h:27
static void set_default()
Makes sure there's a global PandaLogger object and makes sure that it is Assimp's default logger...
Definition: pandaLogger.cxx:28