1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     dbg_Result.h
4 
5   Copyright (C)2009 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 18508 $
14  *---------------------------------------------------------------------------*/
15 
16 /*!
17     @file
18 
19     :include nn/dbg.h
20 */
21 
22 #ifndef NN_DBG_DBG_RESULT_H_
23 #define NN_DBG_DBG_RESULT_H_
24 
25 #include <nn/Result.h>
26 
27 #ifdef __cplusplus
28 namespace nn { namespace dbg {
29 
30 /*
31     @enum ResultDescription
32 
33     @brief エラーの詳細を示します。
34 */
35 enum ResultDescription
36 {
37     DESCRIPTION_DBEUG_OUTPUT_IS_DISABLED = 1,   //!< デバッグ出力は無効化されている
38     DESCRIPTION_DEBUGGER_NOT_PRESENT,           //!< デバッガが接続されていない
39     DESCRIPTION_INACCESSIBLE_PAGE               //!< アクセスできないページが含まれている
40 };
41 
42 NN_DEFINE_RESULT_FUNC_LM(MakeInformationalResult, Result::LEVEL_INFO, Result::MODULE_NN_DBG);
43 NN_DEFINE_RESULT_FUNC_LM(MakePermanentResult, Result::LEVEL_PERMANENT, Result::MODULE_NN_DBG);
44 
45 NN_DEFINE_RESULT_CONST_LM(
46     ResultDebugOutputIsDisabled,
47     MakeInformationalResult, Result::SUMMARY_NOTHING_HAPPENED, DESCRIPTION_DBEUG_OUTPUT_IS_DISABLED
48 );
49 
50 NN_DEFINE_RESULT_CONST_LM(
51     ResultInaccessiblePage,
52     MakePermanentResult, Result::SUMMARY_WRONG_ARGUMENT, DESCRIPTION_INACCESSIBLE_PAGE
53 );
54 
55 NN_DEFINE_RESULT_CONST(
56     ResultOutOfRange,
57     Result::LEVEL_USAGE, Result::SUMMARY_INVALID_ARGUMENT, Result::MODULE_NN_DBG, Result::DESCRIPTION_OUT_OF_RANGE
58 );
59 
60 NN_DEFINE_RESULT_CONST_LM(
61     ResultDebuggerNotPresent,
62     MakeInformationalResult, Result::SUMMARY_NOTHING_HAPPENED, DESCRIPTION_DEBUGGER_NOT_PRESENT
63 );
64 
65 }}
66 
67 #endif  // ifdef __cplusplus
68 
69 
70 #endif /* NN_DBG_DBG_RESULT_H_ */
71