Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

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 
00030 #include <axis2_allocator.h>
00031 #include <axis2_env.h>
00032 #include <axis2_error.h>
00033 #include <axis2_string.h>
00034 #include <axis2_utils.h>
00035 #include <axis2_array_list.h>
00036 #include <axis2_hash.h>
00037 #include <axis2_qname.h>
00038 #include <xml_schema_obj.h>
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00045 typedef struct xml_schema_obj_table 
00046                     xml_schema_obj_table_t;
00047 typedef struct xml_schema_obj_table_ops 
00048                     xml_schema_obj_table_ops_t;
00049 
00055 struct xml_schema_obj_table_ops
00056 {
00061     axis2_status_t (AXIS2_CALL *
00062     free)(
00063             xml_schema_obj_table_t *obj_table,
00064             const axis2_env_t *env);
00065 
00066     int (AXIS2_CALL *
00067     get_count)(
00068             xml_schema_obj_table_t *obj_table,
00069             const axis2_env_t *env);
00070 
00071     void *(AXIS2_CALL *
00072     get_item)(
00073             xml_schema_obj_table_t *obj_table,
00074             const axis2_env_t *env,
00075             axis2_qname_t *qname);
00076 
00077     axis2_array_list_t *(AXIS2_CALL *
00078     get_names)(
00079             xml_schema_obj_table_t *obj_table,
00080             const axis2_env_t *env);
00081 
00082     axis2_array_list_t *(AXIS2_CALL *
00083     get_values)(
00084             xml_schema_obj_table_t *obj_table,
00085             const axis2_env_t *env);
00086 
00087     axis2_bool_t (AXIS2_CALL *
00088     contains)(
00089             xml_schema_obj_table_t *obj_table,
00090             const axis2_env_t *env,
00091             axis2_qname_t *qname);
00092 
00093     axis2_status_t (AXIS2_CALL *
00094     add) (
00095             xml_schema_obj_table_t *obj_table,
00096             const axis2_env_t *env,
00097             axis2_qname_t *qname,
00098             void *value);
00099           
00100     axis2_status_t (AXIS2_CALL *
00101     put)(
00102             xml_schema_obj_table_t *obj_table,
00103             const axis2_env_t *env,
00104             axis2_char_t *key,
00105             void *value);
00106          
00107     axis2_hash_t* (AXIS2_CALL *
00108     get_hash_table)(
00109             xml_schema_obj_table_t *obj_table,
00110             const axis2_env_t *env);
00111             
00112     void* (AXIS2_CALL*
00113     get)(   xml_schema_obj_table_t *obj_table,
00114             const axis2_env_t *env,
00115             axis2_char_t *key);            
00116             
00117                                            
00118 };
00119 
00120 struct xml_schema_obj_table
00121 {
00122     xml_schema_obj_table_ops_t *ops;
00123 };
00124 
00125 AXIS2_EXTERN xml_schema_obj_table_t * AXIS2_CALL
00126 xml_schema_obj_table_create(const axis2_env_t *env);
00127 
00128 /********************* macros ************************************************/
00129 #define XML_SCHEMA_OBJ_TABLE_FREE(obj_table, env) \
00130       ((obj_table)->ops->free (obj_table, env))
00131 
00132 #define XML_SCHEMA_OBJ_TABLE_GET_COUNT(obj_table, env) \
00133       ((obj_table)->ops->get_count (obj_table, env))
00134 
00135 #define XML_SCHEMA_OBJ_TABLE_GET_ITEM(obj_table, env, qname) \
00136       ((obj_table)->ops->get_item (obj_table, env, qname))
00137 
00138 #define XML_SCHEMA_OBJ_TABLE_GET_NAMES(obj_table, env) \
00139       ((obj_table)->ops->get_names (obj_table, env))
00140 
00141 #define XML_SCHEMA_OBJ_TABLE_GET_VALUES(obj_table, env) \
00142       ((obj_table)->ops->get_values (obj_table, env))
00143 
00144 #define XML_SCHEMA_OBJ_TABLE_CONTAINS(obj_table, env, qname) \
00145       ((obj_table)->ops->contains (obj_table, env, qname))
00146 
00147 #define XML_SCHEMA_OBJ_TABLE_ADD(obj_table, env, qname, value) \
00148       ((obj_table)->ops->add (obj_table, env, qname, value))
00149       
00150 #define XML_SCHEMA_OBJ_TABLE_PUT(obj_table, env, key, value) \
00151       ((obj_table)->ops->put(obj_table, env, key, value))
00152       
00153 #define XML_SCHEMA_OBJ_TABLE_GET(obj_table, env, key) \
00154       ((obj_table)->ops->get(obj_table, env, key))
00155       
00156 #define XML_SCHEMA_OBJ_TABLE_GET_HASH_TABLE(obj_table, env) \
00157       ((obj_table)->ops->get_hash_table(obj_table, env))
00158 
00160 #ifdef __cplusplus
00161 }
00162 #endif
00163 #endif /* XML_SCHEMA_OBJ_TABLE_H */

Generated on Fri Jun 16 18:02:32 2006 for Axis2/C by  doxygen 1.4.2