xml_schema_obj_table.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 XML_SCHEMA_OBJ_TABLE_H
00019 #define XML_SCHEMA_OBJ_TABLE_H
00020 
00036 #include <axis2_allocator.h>
00037 #include <axis2_env.h>
00038 #include <axis2_error.h>
00039 #include <axis2_string.h>
00040 #include <axis2_utils.h>
00041 #include <axis2_array_list.h>
00042 #include <axis2_hash.h>
00043 #include <axis2_qname.h>
00044 #include <xml_schema_obj.h>
00045 
00046 #ifdef __cplusplus
00047 extern "C"
00048 {
00049 #endif
00050 
00051 /* Type name for struct xml_schema_obj_table */
00052 typedef struct xml_schema_obj_table xml_schema_obj_table_t;
00053 
00054 /* Type name for struct xml_schema_obj_table_ops */
00055 typedef struct xml_schema_obj_table_ops xml_schema_obj_table_ops_t;
00056 
00057 
00061 struct xml_schema_obj_table_ops
00062 {
00071     axis2_status_t (AXIS2_CALL *
00072     free)(
00073             xml_schema_obj_table_t *obj_table,
00074             const axis2_env_t *env);
00075             
00082     int (AXIS2_CALL *
00083     get_count)(
00084             xml_schema_obj_table_t *obj_table,
00085             const axis2_env_t *env);
00092     void *(AXIS2_CALL *
00093     get_item)(
00094             xml_schema_obj_table_t *obj_table,
00095             const axis2_env_t *env,
00096             const axis2_qname_t *qname);
00097 
00105     axis2_array_list_t *(AXIS2_CALL *
00106     get_names)(
00107             xml_schema_obj_table_t *obj_table,
00108             const axis2_env_t *env);
00109 
00117     axis2_array_list_t *(AXIS2_CALL *
00118     get_values)(
00119             xml_schema_obj_table_t *obj_table,
00120             const axis2_env_t *env);
00121 
00129     axis2_bool_t (AXIS2_CALL *
00130     contains)(
00131             xml_schema_obj_table_t *obj_table,
00132             const axis2_env_t *env,
00133             axis2_qname_t *qname);
00134 
00135     axis2_status_t (AXIS2_CALL *
00136     add) (
00137             xml_schema_obj_table_t *obj_table,
00138             const axis2_env_t *env,
00139             axis2_qname_t *qname,
00140             void *value);
00141           
00142     axis2_status_t (AXIS2_CALL *
00143     put)(
00144             xml_schema_obj_table_t *obj_table,
00145             const axis2_env_t *env,
00146             axis2_char_t *key,
00147             void *value);
00148          
00149     axis2_hash_t* (AXIS2_CALL *
00150     get_hash_table)(
00151             xml_schema_obj_table_t *obj_table,
00152             const axis2_env_t *env);
00153             
00154     void* (AXIS2_CALL*
00155     get)(   xml_schema_obj_table_t *obj_table,
00156             const axis2_env_t *env,
00157             axis2_char_t *key);            
00158             
00159                                            
00160 };
00161 
00162 struct xml_schema_obj_table
00163 {
00164     xml_schema_obj_table_ops_t *ops;
00165 };
00166 
00167 AXIS2_EXTERN xml_schema_obj_table_t * AXIS2_CALL
00168 xml_schema_obj_table_create(const axis2_env_t *env);
00169 
00170 /********************* macros ************************************************/
00171 #define XML_SCHEMA_OBJ_TABLE_FREE(obj_table, env) \
00172       ((obj_table)->ops->free (obj_table, env))
00173 
00174 #define XML_SCHEMA_OBJ_TABLE_GET_COUNT(obj_table, env) \
00175       ((obj_table)->ops->get_count (obj_table, env))
00176 
00177 #define XML_SCHEMA_OBJ_TABLE_GET_ITEM(obj_table, env, qname) \
00178       ((obj_table)->ops->get_item (obj_table, env, qname))
00179 
00180 #define XML_SCHEMA_OBJ_TABLE_GET_NAMES(obj_table, env) \
00181       ((obj_table)->ops->get_names (obj_table, env))
00182 
00183 #define XML_SCHEMA_OBJ_TABLE_GET_VALUES(obj_table, env) \
00184       ((obj_table)->ops->get_values (obj_table, env))
00185 
00186 #define XML_SCHEMA_OBJ_TABLE_CONTAINS(obj_table, env, qname) \
00187       ((obj_table)->ops->contains (obj_table, env, qname))
00188 
00189 #define XML_SCHEMA_OBJ_TABLE_ADD(obj_table, env, qname, value) \
00190       ((obj_table)->ops->add (obj_table, env, qname, value))
00191       
00192 #define XML_SCHEMA_OBJ_TABLE_PUT(obj_table, env, key, value) \
00193       ((obj_table)->ops->put(obj_table, env, key, value))
00194       
00195 #define XML_SCHEMA_OBJ_TABLE_GET(obj_table, env, key) \
00196       ((obj_table)->ops->get(obj_table, env, key))
00197       
00198 #define XML_SCHEMA_OBJ_TABLE_GET_HASH_TABLE(obj_table, env) \
00199       ((obj_table)->ops->get_hash_table(obj_table, env))
00200 
00202 #ifdef __cplusplus
00203 }
00204 #endif
00205 #endif /* XML_SCHEMA_OBJ_TABLE_H */

Generated on Wed Dec 20 20:14:11 2006 for Axis2/C by  doxygen 1.5.1