w2c_typemapper.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 W2C_TYPEMAPPER_H
00018 #define W2C_TYPEMAPPER_H
00019 
00025 #include <axis2_utils.h>
00026 #include <axis2_array_list.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_qname.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035 #define W2C_TYPEMAPPER_MAPPING_PATH "/conf/typemappers/"
00036 
00042 typedef struct w2c_typemapper w2c_typemapper_t;
00043 typedef struct w2c_typemapper_ops w2c_typemapper_ops_t;
00044 
00045 AXIS2_DECLARE_DATA  struct w2c_typemapper_ops
00046 {
00054     axis2_status_t (AXIS2_CALL *
00055     free)(w2c_typemapper_t *typemapper,
00056          const axis2_env_t *env);
00057 
00066     axis2_char_t* (AXIS2_CALL *
00067     get_parameter_name)(w2c_typemapper_t *typemapper,
00068           const axis2_env_t *env,
00069           axis2_qname_t *qname);
00070 
00078     axis2_char_t* (AXIS2_CALL *
00079     get_type_name)(w2c_typemapper_t *typemapper,
00080           const axis2_env_t *env,
00081           axis2_qname_t *qname);
00082 
00091     axis2_status_t (AXIS2_CALL *
00092     add_typemapping_name)(w2c_typemapper_t *typemapper,
00093           const axis2_env_t *env,
00094           axis2_qname_t *qname,
00095           axis2_char_t *name);
00096 
00103     axis2_char_t* (AXIS2_CALL *
00104     get_default_mapping_name)(w2c_typemapper_t *typemapper,
00105           const axis2_env_t *env);
00106 
00113     axis2_qname_t* (AXIS2_CALL *
00114     get_default_qname)(w2c_typemapper_t *typemapper,
00115           const axis2_env_t *env);
00116 
00123     axis2_hash_t* (AXIS2_CALL *
00124     get_all)(w2c_typemapper_t *typemapper,
00125           const axis2_env_t *env);
00126    
00134     axis2_bool_t (AXIS2_CALL *
00135     is_primitive)(w2c_typemapper_t *typemapper,
00136           const axis2_env_t *env,
00137           axis2_qname_t *qname);
00138 
00139 };
00140 
00141 AXIS2_DECLARE_DATA  struct w2c_typemapper
00142 {
00143      struct w2c_typemapper_ops *ops;
00144 };
00145 
00152 AXIS2_EXTERN w2c_typemapper_t* AXIS2_CALL
00153 w2c_typemapper_create_from_file( const axis2_env_t *env,
00154                    axis2_char_t *filename);
00155 
00156 /*************************** Function macros **********************************/
00157 
00158 #define W2C_TYPEMAPPER_FREE(typemapper, env) \
00159       ((typemapper)->ops->free (typemapper, env)) 
00160 
00161 #define W2C_TYPEMAPPER_GET_MAPPING_NAME(typemapper, env, qname)\
00162       ((typemapper)->ops->get_mapping_name(typemapper, env, qname))
00163     
00164 #define W2C_TYPEMAPPER_GET_PARAMETER_NAME(typemapper, env, qname)\
00165       ((typemapper)->ops->get_parameter_name(typemapper, env, qname))
00166     
00167 #define W2C_TYPEMAPPER_GET_TYPE_NAME(typemapper, env, qname)\
00168       ((typemapper)->ops->get_type_name(typemapper, env, qname))
00169 
00170 #define W2C_TYPEMAPPER_ADD_TYPEMAPPING_NAME(typemapper, env, qname, name)\
00171       ((typemapper)->ops->add_typemapping_name(typemapper, env, qname, name))
00172 
00173 #define W2C_TYPEMAPPER_GET_DEFAULT_MAPPING_NAME(typemapper, env)\
00174       ((typemapper)->ops->get_default_mapping_name(typemapper, env))
00175 
00176 #define W2C_TYPEMAPPER_GET_DEFAULT_QNAME(typemapper, env)\
00177       ((typemapper)->ops->get_default_qname(typemapper, env))
00178 
00179 #define W2C_TYPEMAPPER_GET_ALL(typemapper, env)\
00180       ((typemapper)->ops->get_all(typemapper, env))
00181 
00182 #define W2C_TYPEMAPPER_IS_PRIMITIVE(typemapper, env, qname)\
00183       ((typemapper)->ops->is_primitive(typemapper, env, qname))
00184 
00187 #ifdef __cplusplus
00188 }
00189 #endif
00190 
00191 #endif /* W2C_TYPEMAPPER_H */

Generated on Tue Oct 3 22:35:48 2006 for Axis2/C by  doxygen 1.4.7