xml_schema_obj_collection.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_COLLECTION_H
00019 #define XML_SCHEMA_OBJ_COLLECTION_H
00020 
00028 #include <axis2_allocator.h>
00029 #include <axis2_env.h>
00030 #include <axis2_error.h>
00031 #include <axis2_string.h>
00032 #include <axis2_array_list.h>
00033 #include <axis2_hash.h>
00034 #include <xml_schema_obj.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00041 typedef struct xml_schema_obj_collection 
00042                     xml_schema_obj_collection_t;
00043 typedef struct xml_schema_obj_collection_ops 
00044                     xml_schema_obj_collection_ops_t;
00045 
00051 struct xml_schema_obj_collection_ops
00052 {
00057     axis2_status_t (AXIS2_CALL *
00058     free) (xml_schema_obj_collection_t *obj_collection,
00059             const axis2_env_t *env);
00060 
00061     int (AXIS2_CALL *
00062     get_count) (xml_schema_obj_collection_t *obj_collection,
00063                     const axis2_env_t *env);
00064 
00065     xml_schema_obj_t *(AXIS2_CALL *
00066     get_item) (xml_schema_obj_collection_t *obj_collection,
00067                     const axis2_env_t *env,
00068                     int i);
00069 
00070     axis2_status_t (AXIS2_CALL *
00071     set_item) (xml_schema_obj_collection_t *obj_collection,
00072                 const axis2_env_t *env,
00073                 int i,
00074                 void *item);
00075 
00076     axis2_status_t (AXIS2_CALL *
00077     add) (xml_schema_obj_collection_t *obj_collection,
00078           const axis2_env_t *env,
00079           void *item);
00080 
00081     axis2_bool_t (AXIS2_CALL *
00082     contains)(xml_schema_obj_collection_t *obj_collection,
00083               const axis2_env_t *env,
00084               void *item);
00085 
00086     axis2_status_t (AXIS2_CALL *
00087     index_of) (xml_schema_obj_collection_t *obj_collection,
00088                const axis2_env_t *env,
00089                void *item);
00090 
00091     void* (AXIS2_CALL *
00092     remove_at)(xml_schema_obj_collection_t *obj_collection,
00093                const axis2_env_t *env,
00094                int i);
00095                 
00096     axis2_array_list_t* (AXIS2_CALL *
00097     to_array)(xml_schema_obj_collection_t *obj_collection,
00098               const axis2_env_t *env);                
00099 
00100 };
00101 
00102 struct xml_schema_obj_collection
00103 {
00104     xml_schema_obj_collection_ops_t *ops;
00105 };
00106 
00107 AXIS2_EXTERN xml_schema_obj_collection_t * AXIS2_CALL
00108 xml_schema_obj_collection_create(const axis2_env_t *env);
00109 
00110 /******************* MACROS ***************************************************/
00111 #define XML_SCHEMA_OBJ_COLLECTION_FREE(obj_collection, env) \
00112       ((obj_collection)->ops->free (obj_collection, env))
00113 
00114 #define XML_SCHEMA_OBJ_COLLECTION_GET_COUNT(obj_collection, env) \
00115       ((obj_collection)->ops->get_count (obj_collection, env))
00116 
00117 #define XML_SCHEMA_OBJ_COLLECTION_GET_ITEM(obj_collection, env, i) \
00118       ((obj_collection)->ops->get_item (obj_collection, env, i))
00119 
00120 #define XML_SCHEMA_OBJ_COLLECTION_SET_ITEM(obj_collection, env, i, item) \
00121       ((obj_collection)->ops->set_item (obj_collection, env, i, item))
00122 
00123 #define XML_SCHEMA_OBJ_COLLECTION_ADD(obj_collection, env, item) \
00124       ((obj_collection)->ops->add (obj_collection, env, item))
00125 
00126 #define XML_SCHEMA_OBJ_COLLECTION_CONTAINS(obj_collection, env, item) \
00127       ((obj_collection)->ops->contains (obj_collection, env, item))
00128 
00129 #define XML_SCHEMA_OBJ_COLLECTION_INDEX_OF(obj_collection, env, item) \
00130       ((obj_collection)->ops->index_of (obj_collection, env, item))
00131 
00132 #define XML_SCHEMA_OBJ_COLLECTION_REMOVE_AT(obj_collection, env, i) \
00133       ((obj_collection)->ops->remove_at (obj_collection, env, i))
00134 
00135 #define XML_SCHEMA_OBJ_COLLECTION_TO_ARRAY(obj_collection, env) \
00136         ((obj_collection)->ops->to_array(obj_collection, env))
00137         
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142 #endif /* XML_SCHEMA_OBJ_COLLECTION_H */

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