Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
neuraylib/assert.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2020 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
8 
9 #ifndef MI_NEURAYLIB_ASSERT_H
10 #define MI_NEURAYLIB_ASSERT_H
11 
12 #include <mi/base/config.h>
13 #include <mi/base/assert.h>
14 
15 namespace mi {
16 
17 namespace neuraylib {
18 
19 // --------------------------------------------------------------------
20 //
21 // Assertions
22 //
23 // --------------------------------------------------------------------
47 #if defined( mi_neuray_assert) && ! defined( mi_neuray_assert_msg) \
48  || ! defined( mi_neuray_assert) && defined( mi_neuray_assert_msg)
49 error "Only one of mi_neuray_assert and mi_neuray_assert_msg has been defined. Please define both."
50 #else
51 #ifndef mi_neuray_assert
52 
66 
67 #define mi_neuray_assert(expr) mi_base_assert(expr)
68 
87 #define mi_neuray_assert_msg(expr, msg) mi_base_assert_msg(expr, msg)
88 
89 #endif // mi_neuray_assert
90 #endif // mi_neuray_assert xor mi_neuray_assert_msg
91 
92  // end group mi_neuray_assert
94 
95 } // namespace neuraylib
96 } // namespace mi
97 
98 
99 #endif // MI_NEURAYLIB_ASSERT_H