axis2_stack.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017  
00018  #ifndef AXIS2_STACK_H
00019  #define AXIS2_STACK_H
00020  
00021  
00027 #include <axis2_utils_defines.h>
00028 #include <axis2_env.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035 typedef struct axis2_stack_ops axis2_stack_ops_t;
00036 typedef struct axis2_stack axis2_stack_t;
00037 
00049  struct axis2_stack_ops
00050 {
00057     axis2_status_t (AXIS2_CALL*
00058     free)(axis2_stack_t *stack,
00059           const axis2_env_t *env);      
00060        
00061     void* (AXIS2_CALL*
00062     pop)(axis2_stack_t *stack,
00063          const axis2_env_t *env); 
00064     
00065     axis2_status_t (AXIS2_CALL *
00066     push)(axis2_stack_t *stack,
00067           const axis2_env_t *env,
00068           void* value);
00069           
00070     int (AXIS2_CALL *
00071     size)(axis2_stack_t *stack,
00072           const axis2_env_t *env);
00078     void* (AXIS2_CALL *
00079     get)(axis2_stack_t *stack,
00080          const axis2_env_t *env);  
00081          
00082     void* (AXIS2_CALL *
00083     get_at)(axis2_stack_t *stack,
00084             const axis2_env_t *env,
00085             int i);
00086                                        
00087           
00088 };
00089  
00090 struct axis2_stack
00091 {
00092     axis2_stack_ops_t *ops;
00093 };
00094 
00095 AXIS2_EXTERN axis2_stack_t * AXIS2_CALL
00096 axis2_stack_create(const axis2_env_t *env);
00097  
00098  
00099 /*************MACROS ********************************************************/
00100  
00101 #define AXIS2_STACK_FREE( stack, env) \
00102         ((stack)->ops->free( stack, env))
00103         
00104 #define AXIS2_STACK_POP( stack, env) \
00105         ((stack)->ops->pop( stack, env))
00106         
00107 #define AXIS2_STACK_PUSH( stack, env, value) \
00108         ((stack)->ops->push( stack, env, value))
00109         
00110 #define AXIS2_STACK_SIZE( stack, env) \
00111         ((stack)->ops->size( stack, env)) 
00112         
00113 #define AXIS2_STACK_GET( stack, env) \
00114         ((stack)->ops->get( stack, env))
00115         
00116 #define AXIS2_STACK_GET_AT( stack, env, i) \
00117         ((stack)->ops->get_at( stack, env, i))        
00118  
00119 /*************END MACROS ****************************************************/
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 #endif /* AXIS2_STACK_H */
00126 

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1