Panda3D
pandaLogger.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file pandaLogger.h
10  * @author rdb
11  * @date 2011-05-05
12  */
13 
14 #ifndef PANDALOGGER_H
15 #define PANDALOGGER_H
16 
17 #include "config_assimp.h"
18 
19 #include <assimp/Logger.hpp>
20 
21 /**
22  * Custom implementation of Assimp::Logger. It simply wraps around the
23  * assimp_cat methods.
24  */
25 class PandaLogger : public Assimp::Logger {
26 public:
27  static void set_default();
28 
29 protected:
30  INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
31  return false;
32  };
33  INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
34  return false;
35  };
36 
37  void OnDebug(const char *message);
38  void OnError(const char *message);
39  void OnInfo(const char *message);
40  void OnWarn(const char *message);
41 
42 private:
43  static PandaLogger *_ptr;
44 };
45 
46 #endif
Custom implementation of Assimp::Logger.
Definition: pandaLogger.h:25
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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:25