Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_allocator.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef AXIS2_ALLOCATOR_H
00018 #define AXIS2_ALLOCATOR_H
00019 
00025 #include <axis2_utils_defines.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031 
00046    AXIS2_DECLARE_DATA typedef struct axis2_allocator
00047     {
00048     
00049 
00058          void * (AXIS2_CALL *malloc) (struct axis2_allocator *allocator, size_t size);
00068          void * (AXIS2_CALL *realloc) (struct axis2_allocator *allocator, void *ptr, size_t size);
00076          void (AXIS2_CALL *free) (struct axis2_allocator *allocator, void *ptr);
00077     } axis2_allocator_t;
00078 
00084     AXIS2_EXTERN axis2_allocator_t * AXIS2_CALL 
00085    axis2_allocator_init (axis2_allocator_t *allocator);
00086 
00092     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00093    axis2_allocator_free(axis2_allocator_t *allocator);
00094 
00095 #define AXIS2_MALLOC(allocator, size) \
00096       ((allocator)->malloc(allocator, size))
00097    
00098 #define AXIS2_REALLOC(allocator, ptr, size) \
00099       ((allocator)->realloc(allocator, ptr, size))
00100       
00101 #define AXIS2_FREE(allocator, ptr) \
00102       ((allocator)->free(allocator, ptr))
00103 
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109 
00110 #endif    /* AXIS2_ALLOCATOR_H */

Generated on Fri Jun 16 18:02:30 2006 for Axis2/C by  doxygen 1.4.2