]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/tools/debugger/DebuggerApp.h
hello world
[icculus/iodoom3.git] / neo / tools / debugger / DebuggerApp.h
1 /*
2 ===========================================================================
3
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. 
6
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).  
8
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code.  If not, see <http://www.gnu.org/licenses/>.
21
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code.  If not, please request a copy in writing from id Software at the address below.
23
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25
26 ===========================================================================
27 */
28 #ifndef DEBUGGERAPP_H_
29 #define DEBUGGERAPP_H_
30
31 #include "../../sys/win32/win_local.h"
32 #include "../../framework/sync/Msg.h"
33
34 #ifndef REGISTRYOPTIONS_H_
35 #include "../common/RegistryOptions.h"
36 #endif
37
38 #ifndef DEBUGGERWINDOW_H_
39 #include "DebuggerWindow.h"
40 #endif
41
42 #ifndef DEBUGGERMESSAGES_H_
43 #include "DebuggerMessages.h"
44 #endif
45
46 #ifndef DEBUGGERCLIENT_H_
47 #include "DebuggerClient.h"
48 #endif
49
50 // These were changed to static by ID so to make it easy we just throw them
51 // in this header
52 const int MAX_MSGLEN = 1400;
53
54 class rvDebuggerApp
55 {
56 public:
57
58         rvDebuggerApp ( );
59
60         bool                            Initialize                              ( HINSTANCE hInstance );
61         int                                     Run                                             ( void );
62         
63         rvRegistryOptions&      GetOptions                              ( void );
64         rvDebuggerClient&       GetClient                               ( void );
65         rvDebuggerWindow&       GetWindow                               ( void );
66         
67         HINSTANCE                       GetInstance                             ( void );
68
69         bool                            TranslateAccelerator    ( LPMSG msg );
70                 
71 protected:
72
73         rvRegistryOptions       mOptions;
74         rvDebuggerWindow*       mDebuggerWindow;
75         HINSTANCE                       mInstance;
76         rvDebuggerClient        mClient;
77         HACCEL                          mAccelerators;
78         
79 private:
80
81         bool    ProcessNetMessages              ( void );
82         bool    ProcessWindowMessages   ( void );
83 };
84
85 ID_INLINE HINSTANCE rvDebuggerApp::GetInstance ( void )
86 {
87         return mInstance;
88 }
89
90 ID_INLINE rvDebuggerClient& rvDebuggerApp::GetClient ( void )
91 {
92         return mClient;
93 }
94
95 ID_INLINE rvRegistryOptions& rvDebuggerApp::GetOptions ( void )
96 {
97         return mOptions;
98 }
99
100 ID_INLINE rvDebuggerWindow& rvDebuggerApp::GetWindow ( void )
101 {
102         assert ( mDebuggerWindow );
103         return *mDebuggerWindow;
104 }
105
106 extern rvDebuggerApp gDebuggerApp;
107
108 #endif // DEBUGGERAPP_H_