miniassimp
diff include/miniassimp/NullLogger.hpp @ 0:879c81d94345
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 28 Jan 2019 18:19:26 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/include/miniassimp/NullLogger.hpp Mon Jan 28 18:19:26 2019 +0200 1.3 @@ -0,0 +1,99 @@ 1.4 +/* 1.5 +Open Asset Import Library (assimp) 1.6 +---------------------------------------------------------------------- 1.7 + 1.8 +Copyright (c) 2006-2018, assimp team 1.9 + 1.10 + 1.11 +All rights reserved. 1.12 + 1.13 +Redistribution and use of this software in source and binary forms, 1.14 +with or without modification, are permitted provided that the 1.15 +following conditions are met: 1.16 + 1.17 +* Redistributions of source code must retain the above 1.18 + copyright notice, this list of conditions and the 1.19 + following disclaimer. 1.20 + 1.21 +* Redistributions in binary form must reproduce the above 1.22 + copyright notice, this list of conditions and the 1.23 + following disclaimer in the documentation and/or other 1.24 + materials provided with the distribution. 1.25 + 1.26 +* Neither the name of the assimp team, nor the names of its 1.27 + contributors may be used to endorse or promote products 1.28 + derived from this software without specific prior 1.29 + written permission of the assimp team. 1.30 + 1.31 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.32 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.33 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1.34 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1.35 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.36 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.37 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1.38 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1.39 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1.40 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1.41 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.42 + 1.43 +---------------------------------------------------------------------- 1.44 +*/ 1.45 + 1.46 +/** @file NullLogger.hpp 1.47 + * @brief Dummy logger 1.48 +*/ 1.49 + 1.50 +#ifndef INCLUDED_AI_NULLLOGGER_H 1.51 +#define INCLUDED_AI_NULLLOGGER_H 1.52 + 1.53 +#include "Logger.hpp" 1.54 + 1.55 +namespace Assimp { 1.56 + 1.57 +// --------------------------------------------------------------------------- 1.58 +/** @brief CPP-API: Empty logging implementation. 1.59 + * 1.60 + * Does nothing! Used by default if the application hasn't requested a 1.61 + * custom logger via #DefaultLogger::set() or #DefaultLogger::create(); */ 1.62 +class ASSIMP_API NullLogger 1.63 + : public Logger { 1.64 + 1.65 +public: 1.66 + 1.67 + /** @brief Logs a debug message */ 1.68 + void OnDebug(const char* message) { 1.69 + (void)message; //this avoids compiler warnings 1.70 + } 1.71 + 1.72 + /** @brief Logs an info message */ 1.73 + void OnInfo(const char* message) { 1.74 + (void)message; //this avoids compiler warnings 1.75 + } 1.76 + 1.77 + /** @brief Logs a warning message */ 1.78 + void OnWarn(const char* message) { 1.79 + (void)message; //this avoids compiler warnings 1.80 + } 1.81 + 1.82 + /** @brief Logs an error message */ 1.83 + void OnError(const char* message) { 1.84 + (void)message; //this avoids compiler warnings 1.85 + } 1.86 + 1.87 + /** @brief Detach a still attached stream from logger */ 1.88 + bool attachStream(LogStream *pStream, unsigned int severity) { 1.89 + (void)pStream; (void)severity; //this avoids compiler warnings 1.90 + return false; 1.91 + } 1.92 + 1.93 + /** @brief Detach a still attached stream from logger */ 1.94 + bool detatchStream(LogStream *pStream, unsigned int severity) { 1.95 + (void)pStream; (void)severity; //this avoids compiler warnings 1.96 + return false; 1.97 + } 1.98 + 1.99 +private: 1.100 +}; 1.101 +} 1.102 +#endif // !! AI_NULLLOGGER_H_INCLUDED