Panda3D
|
00001 // Filename: pandaLogger.h 00002 // Created by: rdb (05May11) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PANDALOGGER_H 00016 #define PANDALOGGER_H 00017 00018 #include "config_assimp.h" 00019 00020 #include "Logger.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : PandaLogger 00024 // Description : Custom implementation of Assimp::Logger. It 00025 // simply wraps around the assimp_cat methods. 00026 //////////////////////////////////////////////////////////////////// 00027 class PandaLogger : public Assimp::Logger { 00028 public: 00029 static void set_default(); 00030 00031 protected: 00032 INLINE bool attachStream(Assimp::LogStream*, unsigned int) {}; 00033 INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {}; 00034 00035 void OnDebug(const char *message); 00036 void OnError(const char *message); 00037 void OnInfo(const char *message); 00038 void OnWarn(const char *message); 00039 00040 private: 00041 static PandaLogger *_ptr; 00042 }; 00043 00044 #endif