Main Page | Modules | Namespace List | Data Structures | File List | Data Fields | Globals | Related Pages

/home/oden/RPM/BUILD/apr-util-0.9.4/include/apr_optional.h

Go to the documentation of this file.
00001 /* Copyright 2001-2004 The Apache Software Foundation 00002 * 00003 * Licensed under the Apache License, Version 2.0 (the "License"); 00004 * you may not use this file except in compliance with the License. 00005 * You may obtain a copy of the License at 00006 * 00007 * http://www.apache.org/licenses/LICENSE-2.0 00008 * 00009 * Unless required by applicable law or agreed to in writing, software 00010 * distributed under the License is distributed on an "AS IS" BASIS, 00011 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00012 * See the License for the specific language governing permissions and 00013 * limitations under the License. 00014 */ 00015 00016 #ifndef APR_OPTIONAL_H 00017 #define APR_OPTIONAL_H 00018 00019 #include "apu.h" 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00041 #define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t 00042 00049 #define APR_DECLARE_OPTIONAL_FN(ret,name,args) \ 00050 typedef ret (APR_OPTIONAL_FN_TYPE(name)) args 00051 00058 typedef void (apr_opt_fn_t)(void); 00060 APU_DECLARE_NONSTD(void) apr_dynamic_fn_register(const char *szName, 00061 apr_opt_fn_t *pfn); 00062 00064 APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName, 00065 apr_opt_fn_t *pfn); 00066 00073 #define APR_REGISTER_OPTIONAL_FN(name) do { \ 00074 APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \ 00075 apr_dynamic_fn_register(#name,(apr_opt_fn_t *)apu__opt); \ 00076 } while (0) 00077 00081 APU_DECLARE(apr_opt_fn_t *) apr_dynamic_fn_retrieve(const char *szName); 00082 00084 APU_DECLARE(apr_opt_fn_t *) apr_retrieve_optional_fn(const char *szName); 00085 00090 #define APR_RETRIEVE_OPTIONAL_FN(name) \ 00091 (APR_OPTIONAL_FN_TYPE(name) *)apr_dynamic_fn_retrieve(#name) 00092 00094 #ifdef __cplusplus 00095 } 00096 #endif 00097 00098 #endif /* APR_OPTIONAL_H */

Generated on Wed Sep 15 18:51:15 2004 for Apache Portable Runtime Utility Library by doxygen 1.3.7