xref: /aoo42x/main/framework/inc/macros/debug.hxx (revision f8e07b45)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
25 #define __FRAMEWORK_MACROS_DEBUG_HXX_
26 
27 //*****************************************************************************************************************
28 //	Disable all feature of this file in produkt version!
29 //	But enable normal assertion handling (as messagebox) in normal debug version.
30 //	User can overwrite these adjustment with his own values! We will do it only if nothing is set.
31 //*****************************************************************************************************************
32 
33 //-----------------------------------------------------------------------------------------------------------------
34 // => "personal debug code"
35 #if OSL_DEBUG_LEVEL > 1
36 
37     // Enable log mechanism for normal assertion and error handling.
38     // Look for user decisions before!
39 	#ifndef	ENABLE_LOGMECHANISM
40 		#define	ENABLE_LOGMECHANISM
41 	#endif
42     // Enable assertion handling himself AND additional warnings.
43 	// The default logtype is MESSAGEBOX.
44 	// see "assertion.hxx" for further informations
45 	#ifndef	ENABLE_ASSERTIONS
46 		#define	ENABLE_ASSERTIONS
47 	#endif
48     #ifndef ENABLE_WARNINGS
49         #define ENABLE_WARNINGS
50 	#endif
51 
52 //-----------------------------------------------------------------------------------------------------------------
53 // => "non product"
54 #elif OSL_DEBUG_LEVEL > 0
55 
56     // Enable log mechanism for normal assertion and error handling.
57     // Look for user decisions before!
58 	#ifndef	ENABLE_LOGMECHANISM
59 		#define	ENABLE_LOGMECHANISM
60 	#endif
61 	// Enable assertion handling himself.
62 	// The default logtype is MESSAGEBOX.
63 	// see "assertion.hxx" for further informations
64 	#ifndef	ENABLE_ASSERTIONS
65 		#define	ENABLE_ASSERTIONS
66 	#endif
67 
68 //-----------------------------------------------------------------------------------------------------------------
69 // => "product" (OSL_DEBUG_LEVEL == 0)
70 #else
71 
72     #undef  ENABLE_LOGMECHANISM
73     #undef  ENABLE_ASSERTIONS
74     #undef  ENABLE_WARNINGS
75 	#undef	ENABLE_EVENTDEBUG
76 	#undef	ENABLE_REGISTRATIONDEBUG
77 	#undef	ENABLE_TARGETINGDEBUG
78     #undef  ENABLE_MUTEXDEBUG
79 //    #undef  ENABLE_TIMEMEASURE
80     #undef  ENABLE_MEMORYMEASURE
81     #undef  ENABLE_FILTERDBG
82 
83 #endif
84 
85 //*****************************************************************************************************************
86 //	generic macros for logging
87 //*****************************************************************************************************************
88 
89 #include <macros/debug/logmechanism.hxx>
90 
91 //*****************************************************************************************************************
92 //	special macros for assertion handling
93 //*****************************************************************************************************************
94 #include <macros/debug/assertion.hxx>
95 
96 //*****************************************************************************************************************
97 //	special macros for event handling
98 //*****************************************************************************************************************
99 #include <macros/debug/event.hxx>
100 
101 //*****************************************************************************************************************
102 //	special macros to debug service registration
103 //*****************************************************************************************************************
104 #include <macros/debug/registration.hxx>
105 
106 //*****************************************************************************************************************
107 //	special macros to debug targeting of frames
108 //*****************************************************************************************************************
109 #include <macros/debug/targeting.hxx>
110 
111 //*****************************************************************************************************************
112 //  special macros to debug threading mechanism
113 //*****************************************************************************************************************
114 #include <macros/debug/mutex.hxx>
115 
116 //*****************************************************************************************************************
117 //  special macros to measure times of some operations
118 //*****************************************************************************************************************
119 
120 /*OBSOLETE
121 #include <macros/debug/timemeasure.hxx>
122 */
123 
124 //*****************************************************************************************************************
125 //  special macros to debug our filter cache!
126 //*****************************************************************************************************************
127 #include <macros/debug/filterdbg.hxx>
128 
129 //*****************************************************************************************************************
130 //	end of file
131 //*****************************************************************************************************************
132 
133 #endif	// #ifndef __FRAMEWORK_MACROS_DEBUG_HXX_
134