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

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_defines.h>
00026 
00027 #ifdef __cplusplus
00028 extern "C"
00029 {
00030 #endif
00031 
00045    AXIS2_DECLARE_DATA typedef struct axis2_allocator
00046     {
00047     
00048 
00054          void * (*malloc) (size_t size);
00061          void * (*realloc) (void *ptr, size_t size);
00066          void (*free) (void *ptr);
00067     } axis2_allocator_t;
00068 
00074     AXIS2_DECLARE(axis2_allocator_t *) axis2_allocator_init (axis2_allocator_t * allocator);
00075 
00076 #define AXIS2_MALLOC(allocator, size) ((allocator)->malloc(size))
00077 #define AXIS2_REALLOC(allocator, ptr, size) ((allocator)->realloc(ptr, size))
00078 #define AXIS2_FREE(allocator, ptr) ((allocator)->free(ptr))
00079 
00082 #ifdef __cplusplus
00083 }
00084 #endif
00085 
00086 #endif    /* AXIS2_ALLOCATOR_H */

Generated on Wed Dec 7 07:58:24 2005 for Axis2/C by  doxygen 1.4.2