Panda3D

Loading...
Searching...
No Matches
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 detachStream(Assimp::LogStream*, unsigned int) {
34 return false;
35 };
36
37 // Kept for compatibility with Assimp 4.x
38 INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
39 return false;
40 };
41
42 void OnDebug(const char *message);
43 void OnVerboseDebug(const char *message);
44 void OnError(const char *message);
45 void OnInfo(const char *message);
46 void OnWarn(const char *message);
47
48 private:
49 static PandaLogger *_ptr;
50};
51
52#endif
PandaLogger
Custom implementation of Assimp::Logger.
Definition pandaLogger.h:25
PandaLogger::set_default
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
config_assimp.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.