Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 09:30:07

0001 /*
0002 Open Asset Import Library (assimp)
0003 ----------------------------------------------------------------------
0004 
0005 Copyright (c) 2006-2020, assimp team
0006 
0007 All rights reserved.
0008 
0009 Redistribution and use of this software in source and binary forms,
0010 with or without modification, are permitted provided that the
0011 following conditions are met:
0012 
0013 * Redistributions of source code must retain the above
0014   copyright notice, this list of conditions and the
0015   following disclaimer.
0016 
0017 * Redistributions in binary form must reproduce the above
0018   copyright notice, this list of conditions and the
0019   following disclaimer in the documentation and/or other
0020   materials provided with the distribution.
0021 
0022 * Neither the name of the assimp team, nor the names of its
0023   contributors may be used to endorse or promote products
0024   derived from this software without specific prior
0025   written permission of the assimp team.
0026 
0027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0028 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0029 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0030 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0031 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0032 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0033 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0034 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0035 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0036 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0038 
0039 ----------------------------------------------------------------------
0040 */
0041 
0042 /** @file Provides facilities to replace the default assert handler. */
0043 
0044 #ifndef INCLUDED_AI_ASSERTHANDLER_H
0045 #define INCLUDED_AI_ASSERTHANDLER_H
0046 
0047 #include <assimp/ai_assert.h>
0048 #include <assimp/defs.h>
0049 
0050 namespace Assimp {
0051 
0052 // ---------------------------------------------------------------------------
0053 /**
0054  *  @brief  Signature of functions which handle assert violations.
0055  */
0056 using AiAssertHandler = void (*)(const char* failedExpression, const char* file, int line);
0057 
0058 // ---------------------------------------------------------------------------
0059 /**
0060  *  @brief  Set the assert handler.
0061  */
0062 ASSIMP_API void setAiAssertHandler(AiAssertHandler handler);
0063 
0064 // ---------------------------------------------------------------------------
0065 /** The assert handler which is set by default.
0066  *
0067  *  @brief  This issues a message to stderr and calls abort.
0068  */
0069 AI_WONT_RETURN ASSIMP_API void defaultAiAssertHandler(const char* failedExpression, const char* file, int line) AI_WONT_RETURN_SUFFIX;
0070 
0071 // ---------------------------------------------------------------------------
0072 /**
0073  *  @brief  Dispatches an assert violation to the assert handler.
0074  */
0075 ASSIMP_API void aiAssertViolation(const char* failedExpression, const char* file, int line);
0076 
0077 } // end of namespace Assimp
0078 
0079 #endif // INCLUDED_AI_ASSERTHANDLER_H