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 #ifndef __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ 23 #define __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ 24 25 //***************************************************************************************************************** 26 // special macros for assertion handling 27 //***************************************************************************************************************** 28 29 #ifdef ENABLE_REGISTRATIONDEBUG 30 31 //_____________________________________________________________________________________________________________ 32 // includes 33 //_____________________________________________________________________________________________________________ 34 35 #ifndef _RTL_STRBUF_HXX_ 36 #include <rtl/strbuf.hxx> 37 #endif 38 39 /*_____________________________________________________________________________________________________________ 40 LOGFILE_ASSERTIONS 41 42 For follow macros we need a special log file. If user forget to specify anyone, we must do it for him! 43 _____________________________________________________________________________________________________________*/ 44 45 #ifndef LOGFILE_REGISTRATION 46 #define LOGFILE_REGISTRATION \ 47 "registration.log" 48 #endif 49 50 #define LOG_REGISTRATION_GETFACTORY( SINFOTEXT ) \ 51 { \ 52 ::rtl::OStringBuffer sOut( 1024 ); \ 53 sOut.append( "component_getFactory():" ); \ 54 sOut.append( SINFOTEXT ); \ 55 WRITE_LOGFILE( LOGFILE_REGISTRATION, sOut.makeStringAndClear() ) \ 56 } 57 58 #else // #ifdef ENABLE_REGISTRATIONDEBUG 59 60 /*_____________________________________________________________________________________________________________ 61 If right testmode isn't set - implements these macro empty! 62 _____________________________________________________________________________________________________________*/ 63 64 #undef LOGFILE_REGISTRATION 65 #define LOG_REGISTRATION_GETFACTORY( SINFOTEXT ) 66 67 #endif // #ifdef ENABLE_REGISTRATIONDEBUG 68 69 //***************************************************************************************************************** 70 // end of file 71 //***************************************************************************************************************** 72 73 #endif // #ifndef __FRAMEWORK_MACROS_DEBUG_REGISTRATION_HXX_ 74 75 /* vim: set noet sw=4 ts=4: */ 76