axis2_stack.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_STACK_H
00018  #define AXIS2_STACK_H
00019  
00020  
00026 #include <axis2_utils_defines.h>
00027 #include <axis2_env.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00034 typedef struct axis2_stack_ops axis2_stack_ops_t;
00035 typedef struct axis2_stack axis2_stack_t;
00036 
00048 AXIS2_DECLARE_DATA struct axis2_stack_ops
00049 {
00056     axis2_status_t (AXIS2_CALL*
00057     free)(axis2_stack_t *stack,
00058           const axis2_env_t *env);      
00059        
00060     void* (AXIS2_CALL*
00061     pop)(axis2_stack_t *stack,
00062          const axis2_env_t *env); 
00063     
00064     axis2_status_t (AXIS2_CALL *
00065     push)(axis2_stack_t *stack,
00066           const axis2_env_t *env,
00067           void* value);
00068           
00069     int (AXIS2_CALL *
00070     size)(axis2_stack_t *stack,
00071           const axis2_env_t *env);
00077     void* (AXIS2_CALL *
00078     get)(axis2_stack_t *stack,
00079          const axis2_env_t *env);  
00080          
00081     void* (AXIS2_CALL *
00082     get_at)(axis2_stack_t *stack,
00083             const axis2_env_t *env,
00084             int i);
00085                                        
00086           
00087 };
00088  
00089 struct axis2_stack
00090 {
00091     axis2_stack_ops_t *ops;
00092 };
00093 
00094 AXIS2_EXTERN axis2_stack_t * AXIS2_CALL
00095 axis2_stack_create(const axis2_env_t *env);
00096  
00097  
00098 /*************MACROS ********************************************************/
00099  
00100 #define AXIS2_STACK_FREE( stack, env) \
00101         ((stack)->ops->free( stack, env))
00102         
00103 #define AXIS2_STACK_POP( stack, env) \
00104         ((stack)->ops->pop( stack, env))
00105         
00106 #define AXIS2_STACK_PUSH( stack, env, value) \
00107         ((stack)->ops->push( stack, env, value))
00108         
00109 #define AXIS2_STACK_SIZE( stack, env) \
00110         ((stack)->ops->size( stack, env)) 
00111         
00112 #define AXIS2_STACK_GET( stack, env) \
00113         ((stack)->ops->get( stack, env))
00114         
00115 #define AXIS2_STACK_GET_AT( stack, env, i) \
00116         ((stack)->ops->get_at( stack, env, i))        
00117  
00118 /*************END MACROS ****************************************************/
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124 #endif /* AXIS2_STACK_H */
00125 

Generated on Thu Aug 31 17:32:36 2006 for Axis2/C by  doxygen 1.4.6