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

Generated on Tue Oct 3 20:48:00 2006 for Axis2/C by  doxygen 1.4.7