Panda3D
 All Classes Functions Variables Enumerations
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  INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {};
34 
35  void OnDebug(const char *message);
36  void OnError(const char *message);
37  void OnInfo(const char *message);
38  void OnWarn(const char *message);
39 
40 private:
41  static PandaLogger *_ptr;
42 };
43 
44 #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