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

Generated on Tue Oct 3 18:21:11 2006 for Axis2/C by  doxygen 1.4.7