xml_schema_identity_constraint.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_IDENTITY_CONSTRAINT_H
00019 #define XML_SCHEMA_IDENTITY_CONSTRAINT_H
00020 
00027 #include <xml_schema_annotated.h>
00028 #include <axis2_hash.h>
00029 #include <axis2_qname.h>
00030 
00037 typedef struct xml_schema_identity_constraint 
00038         xml_schema_identity_constraint_t;
00039 typedef struct xml_schema_identity_constraint_ops 
00040         xml_schema_identity_constraint_ops_t;
00041 struct xml_schema_xpath;
00042 struct xml_schema_obj_collection;
00043 
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048 
00049 struct xml_schema_identity_constraint_ops
00050 {
00055     axis2_status_t (AXIS2_CALL *
00056     free) (void *id_constr,
00057             const axis2_env_t *env);
00058 
00059     xml_schema_annotated_t *(AXIS2_CALL *
00060     get_base_impl) (void *id_constr,
00061                     const axis2_env_t *env);
00062                     
00063     axis2_hash_t *(AXIS2_CALL *
00064     super_objs) (void *id_constr,
00065                 const axis2_env_t *env);
00066                 
00067                         
00068     xml_schema_types_t (AXIS2_CALL *
00069     get_type) (void *id_constr,
00070             const axis2_env_t *env);   
00071         
00073     axis2_qname_t* (AXIS2_CALL *
00074     get_refer)(void *id_constr,
00075                const axis2_env_t *env);
00076 
00078     axis2_status_t (AXIS2_CALL *                                                                    set_refer)(void *id_constr,
00079                const axis2_env_t *env,
00080                axis2_qname_t *refer);
00081 
00082     struct xml_schema_obj_collection *(AXIS2_CALL *
00083     get_fields)(void *id_constr,
00084                 const axis2_env_t *env);
00085 
00086     axis2_char_t *(AXIS2_CALL *
00087     get_name)(void *id_constr,
00088                 const axis2_env_t *env);
00089     
00090     axis2_status_t (AXIS2_CALL *
00091     set_name)(void *id_constr,
00092                     const axis2_env_t *env,
00093                     axis2_char_t *name);
00094     
00095     struct xml_schema_xpath *(AXIS2_CALL *
00096     get_selector)(void *id_constr,
00097                     const axis2_env_t *env);
00098     
00099     axis2_status_t (AXIS2_CALL *
00100     set_selector)(void *id_constr,
00101                     const axis2_env_t *env,
00102                     struct xml_schema_xpath *selector);
00103 };
00104 
00105 struct xml_schema_identity_constraint
00106 {
00107     xml_schema_annotated_t base;
00108     xml_schema_identity_constraint_ops_t *ops;
00109 };
00110 
00114 AXIS2_EXTERN xml_schema_identity_constraint_t * AXIS2_CALL
00115 xml_schema_identity_constraint_create(const axis2_env_t *env);
00116 
00117 AXIS2_EXTERN xml_schema_identity_constraint_t * AXIS2_CALL
00118 xml_schema_unique_create(const axis2_env_t *env);
00119 
00120 AXIS2_EXTERN xml_schema_identity_constraint_t * AXIS2_CALL
00121 xml_schema_keyref_create(const axis2_env_t *env);
00122 
00123 AXIS2_EXTERN xml_schema_identity_constraint_t * AXIS2_CALL
00124 xml_schema_key_create(const axis2_env_t *env);
00125 
00126 /**************** Macros *****************************************************/        
00127 
00128 #define XML_SCHEMA_IDENTITY_CONSTRAINT_FREE(id_constr, env) \
00129       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00130             free(id_constr, env))
00131 
00132 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_BASE_IMPL(id_constr, env) \
00133       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00134             get_base_impl(id_constr, env))
00135 
00136 
00137 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_TYPE(id_constr, env) \
00138       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00139             get_type(id_constr, env))
00140 
00141 #define XML_SCHEMA_IDENTITY_CONSTRAINT_SUPER_OBJS(id_constr, env) \
00142       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00143             super_objs(id_constr, env))
00144 
00145 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_REFER(id_constr, env) \
00146       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00147             get_refer(id_constr, env))
00148             
00149 #define XML_SCHEMA_IDENTITY_CONSTRAINT_SET_REFER(id_constr, env, refer) \
00150       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00151             set_refer(id_constr, env, refer))            
00152 
00153 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_FIELDS(id_constr, env) \
00154       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00155             get_fields(id_constr, env))
00156 
00157 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_NAME(id_constr, env) \
00158       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00159             get_name(id_constr, env))
00160 
00161 #define XML_SCHEMA_IDENTITY_CONSTRAINT_SET_NAME(id_constr, env, name) \
00162       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00163             set_name(id_constr, env, name))
00164 
00165 #define XML_SCHEMA_IDENTITY_CONSTRAINT_GET_SELECTOR(id_constr, env) \
00166       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00167             get_selector(id_constr, env))
00168 
00169 #define XML_SCHEMA_IDENTITY_CONSTRAINT_SET_SELECTOR(id_constr, env, selector) \
00170       (((xml_schema_identity_constraint_t *) id_constr)->ops->\
00171             set_selector(id_constr, env, selector))
00172 
00173 /********************** macros **************************************************/
00175 #ifdef __cplusplus
00176 }
00177 #endif
00178 #endif /* XML_SCHEMA_IDENTITY_CONSTRAINT_H */

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