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

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