NVIDIA Iray API
 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, 2014 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 // --------------------------------------------------------------------
50 #if defined( mi_neuray_assert) && ! defined( mi_neuray_assert_msg) \
51  || ! defined( mi_neuray_assert) && defined( mi_neuray_assert_msg)
52 error "Only one of mi_neuray_assert and mi_neuray_assert_msg has been defined. Please define both."
53 #else
54 #ifndef mi_neuray_assert
55 
70 #define mi_neuray_assert(expr) mi_base_assert(expr)
71 
91 #define mi_neuray_assert_msg(expr, msg) mi_base_assert_msg(expr, msg)
92 
93 #endif // mi_neuray_assert
94 #endif // mi_neuray_assert xor mi_neuray_assert_msg
95 
96  // end group mi_neuray_assert
98 
99 } // namespace neuraylib
100 } // namespace mi
101 
102 
103 #endif // MI_NEURAYLIB_ASSERT_H