1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     dbg_PrintResult.h
4   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law. They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10   $Rev: 36977 $
11  *---------------------------------------------------------------------------
12 
13 
14 */
15 
16 /* Please see man pages for details
17 
18 
19 
20 */
21 
22 #ifndef NN_DBG_DBG_PRINTRESULT_H_
23 #define NN_DBG_DBG_PRINTRESULT_H_
24 
25 #include <nn/Result.h>
26 
27 #ifdef __cplusplus
28 namespace nn { namespace dbg {
29 
30 /*
31 
32 
33 
34 
35 
36 */
37 const char* GetLevelString(nn::Result result);
38 
39 /*
40 
41 
42 
43 
44 
45 */
46 const char* GetModuleString(nn::Result result);
47 
48 /*
49 
50 
51 
52 
53 
54 */
55 const char* GetSummaryString(nn::Result result);
56 
57 /*
58 
59 
60 
61 
62 
63 */
64 const char* GetDescriptionString(nn::Result result);
65 
66 /*
67 
68 
69 
70 */
71 void PrintResult(Result result);
72 
73 /*
74 
75 
76 
77 */
78 void TPrintResult(Result result);
79 
80 }}
81 
82 #ifndef NN_SWITCH_DISABLE_ASSERT_WARNING
83     #define NN_DBG_DECLARE_GET_RESULT_DESCRIPTION_STRING_IMPL_KEEPER(libname) \
84         namespace nn { namespace libname { \
85             void GetResultDescriptionStringImplKeeper(); \
86         }}
87 
88     #define NN_DBG_USE_GET_RESULT_DESCRIPTION_STRING_IMPL_KEEPER(libname) (::nn::libname::GetResultDescriptionStringImplKeeper())
89 #else
90     #define NN_DBG_DECLARE_GET_RESULT_DESCRIPTION_STRING_IMPL_KEEPER(libname)
91     #define NN_DBG_USE_GET_RESULT_DESCRIPTION_STRING_IMPL_KEEPER(libname) (void)0
92 #endif
93 
94 #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT
95     #define NN_DBG_CHECK_RESULT(exp)    NN_UTIL_PANIC_IF_FAILED(exp)
96     #define NN_DBG_PRINT_RESULT(exp)    ::nn::dbg::PrintResult(exp)
97     #define NN_DBG_TPRINT_RESULT_(exp)  ::nn::dbg::TPrintResult(exp)
98 #else
99     #define NN_DBG_CHECK_RESULT(exp)    ((void)(exp))
100     #define NN_DBG_PRINT_RESULT(exp)    ((void)(exp))
101     #define NN_DBG_TPRINT_RESULT_(exp)  ((void)(exp))
102 #endif
103 
104 #endif  // ifdef __cplusplus
105 
106 
107 #endif /* NN_DBG_DBG_RESULT_H_ */
108