xref: /aoo42x/main/framework/inc/macros/debug.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
29 #define __FRAMEWORK_MACROS_DEBUG_HXX_
30 
31 //*****************************************************************************************************************
32 //	Disable all feature of this file in produkt version!
33 //	But enable normal assertion handling (as messagebox) in normal debug version.
34 //	User can overwrite these adjustment with his own values! We will do it only if nothing is set.
35 //*****************************************************************************************************************
36 
37 //-----------------------------------------------------------------------------------------------------------------
38 // => "personal debug code"
39 #if OSL_DEBUG_LEVEL > 1
40 
41     // Enable log mechanism for normal assertion and error handling.
42     // Look for user decisions before!
43 	#ifndef	ENABLE_LOGMECHANISM
44 		#define	ENABLE_LOGMECHANISM
45 	#endif
46     // Enable assertion handling himself AND additional warnings.
47 	// The default logtype is MESSAGEBOX.
48 	// see "assertion.hxx" for further informations
49 	#ifndef	ENABLE_ASSERTIONS
50 		#define	ENABLE_ASSERTIONS
51 	#endif
52     #ifndef ENABLE_WARNINGS
53         #define ENABLE_WARNINGS
54 	#endif
55 
56 //-----------------------------------------------------------------------------------------------------------------
57 // => "non product"
58 #elif OSL_DEBUG_LEVEL > 0
59 
60     // Enable log mechanism for normal assertion and error handling.
61     // Look for user decisions before!
62 	#ifndef	ENABLE_LOGMECHANISM
63 		#define	ENABLE_LOGMECHANISM
64 	#endif
65 	// Enable assertion handling himself.
66 	// The default logtype is MESSAGEBOX.
67 	// see "assertion.hxx" for further informations
68 	#ifndef	ENABLE_ASSERTIONS
69 		#define	ENABLE_ASSERTIONS
70 	#endif
71 
72 //-----------------------------------------------------------------------------------------------------------------
73 // => "product" (OSL_DEBUG_LEVEL == 0)
74 #else
75 
76     #undef  ENABLE_LOGMECHANISM
77     #undef  ENABLE_ASSERTIONS
78     #undef  ENABLE_WARNINGS
79 	#undef	ENABLE_EVENTDEBUG
80 	#undef	ENABLE_REGISTRATIONDEBUG
81 	#undef	ENABLE_TARGETINGDEBUG
82     #undef  ENABLE_MUTEXDEBUG
83 //    #undef  ENABLE_TIMEMEASURE
84     #undef  ENABLE_MEMORYMEASURE
85     #undef  ENABLE_FILTERDBG
86 
87 #endif
88 
89 //*****************************************************************************************************************
90 //	generic macros for logging
91 //*****************************************************************************************************************
92 
93 #include <macros/debug/logmechanism.hxx>
94 
95 //*****************************************************************************************************************
96 //	special macros for assertion handling
97 //*****************************************************************************************************************
98 #include <macros/debug/assertion.hxx>
99 
100 //*****************************************************************************************************************
101 //	special macros for event handling
102 //*****************************************************************************************************************
103 #include <macros/debug/event.hxx>
104 
105 //*****************************************************************************************************************
106 //	special macros to debug service registration
107 //*****************************************************************************************************************
108 #include <macros/debug/registration.hxx>
109 
110 //*****************************************************************************************************************
111 //	special macros to debug targeting of frames
112 //*****************************************************************************************************************
113 #include <macros/debug/targeting.hxx>
114 
115 //*****************************************************************************************************************
116 //  special macros to debug threading mechanism
117 //*****************************************************************************************************************
118 #include <macros/debug/mutex.hxx>
119 
120 //*****************************************************************************************************************
121 //  special macros to measure times of some operations
122 //*****************************************************************************************************************
123 
124 /*OBSOLETE
125 #include <macros/debug/timemeasure.hxx>
126 */
127 
128 //*****************************************************************************************************************
129 //  special macros to debug our filter cache!
130 //*****************************************************************************************************************
131 #include <macros/debug/filterdbg.hxx>
132 
133 //*****************************************************************************************************************
134 //	end of file
135 //*****************************************************************************************************************
136 
137 #endif	// #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
138