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