axiom_attribute.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 AXIOM_ATTRIBUTE_H
00019 #define AXIOM_ATTRIBUTE_H
00020 
00025 #include <axis2_env.h>
00026 #include <axis2_qname.h>
00027 #include <axiom_namespace.h>
00028 #include <axiom_output.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035     struct axiom_attribute;
00036     struct axiom_attribute_ops;
00037 
00048     typedef struct axiom_attribute_ops
00049     {
00058         axis2_status_t (AXIS2_CALL *
00059         free)(struct axiom_attribute *om_attribute,
00060               const axis2_env_t *env);
00061 
00070         axis2_qname_t * (AXIS2_CALL *
00071         get_qname)(struct axiom_attribute *om_attribute,
00072                    const axis2_env_t *env);
00073 
00082         int (AXIS2_CALL *
00083         serialize)(struct axiom_attribute *om_attribute,
00084                    const axis2_env_t *env,
00085                    axiom_output_t *om_output);
00086        
00092         axis2_char_t* (AXIS2_CALL *
00093         get_localname)(struct axiom_attribute *om_attribute,
00094                        const axis2_env_t *env);
00101         axis2_char_t* (AXIS2_CALL *
00102         get_value)(struct axiom_attribute *om_attribute,
00103                    const axis2_env_t *env);
00110         axiom_namespace_t* (AXIS2_CALL *
00111         get_namespace)(struct axiom_attribute *om_attribute,
00112                        const axis2_env_t *env);
00113        
00120         axis2_status_t (AXIS2_CALL *
00121         set_localname)(struct axiom_attribute *om_attribute,
00122                        const axis2_env_t *env,
00123                        const axis2_char_t *localname);
00124        
00132         axis2_status_t (AXIS2_CALL *
00133         set_value)(struct axiom_attribute *om_attribute,
00134                    const axis2_env_t *env,
00135                    const axis2_char_t *value);
00136        
00144         axis2_status_t (AXIS2_CALL *
00145         set_namespace)(struct axiom_attribute *om_attribute,
00146                        const axis2_env_t *env,
00147                        axiom_namespace_t *om_namespace);
00148 
00156         struct axiom_attribute* (AXIS2_CALL *
00157         clone)(struct axiom_attribute *om_attribute,
00158                const axis2_env_t *env);
00159 
00160 
00161     } axiom_attribute_ops_t;
00162 
00167     typedef struct axiom_attribute
00168     {
00170           axiom_attribute_ops_t *ops;
00171           int ref;
00172        
00173     } axiom_attribute_t;
00174 
00184     AXIS2_EXTERN axiom_attribute_t * AXIS2_CALL
00185     axiom_attribute_create (const axis2_env_t *env,
00186                                const axis2_char_t *localname,
00187                                const axis2_char_t *value,
00188                                axiom_namespace_t *ns);
00194     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00195     axiom_attribute_free_void_arg (
00196             void *om_attribute,
00197             const axis2_env_t *env);
00198      
00199 /******************** Macros **************************************************/
00200     
00201     
00203 #define AXIOM_ATTRIBUTE_FREE(om_attribute, env) \
00204         ((om_attribute)->ops->free(om_attribute, env))
00205         
00207 #define AXIOM_ATTRIBUTE_GET_QNAME(om_attribute,env) \
00208         ((om_attribute)->ops->get_qname(om_attribute, env))
00209         
00211 #define AXIOM_ATTRIBUTE_SERIALIZE(om_attribute, env, om_ouput) \
00212         ((om_attribute)->ops->serialize(om_attribute, env, om_output))
00213 
00214 #define AXIOM_ATTRIBUTE_GET_NAMESPACE(om_attribute, env) \
00215         ((om_attribute)->ops->get_namespace(om_attribute, env))
00216 
00217 #define AXIOM_ATTRIBUTE_GET_LOCALNAME(om_attribute, env) \
00218         ((om_attribute)->ops->get_localname(om_attribute, env))
00219 
00220 #define AXIOM_ATTRIBUTE_GET_VALUE(om_attribute, env) \
00221         ((om_attribute)->ops->get_value(om_attribute, env))
00222 
00223 #define AXIOM_ATTRIBUTE_SET_NAMESPACE(om_attribute, env,ns) \
00224         ((om_attribute)->ops->set_namespace(om_attribute, env,ns))
00225 
00226 #define AXIOM_ATTRIBUTE_SET_LOCALNAME(om_attribute, env,localname) \
00227         ((om_attribute)->ops->set_localname(om_attribute, env,localname))
00228 
00229 #define AXIOM_ATTRIBUTE_SET_VALUE(om_attribute, env,value) \
00230         ((om_attribute)->ops->set_value(om_attribute, env,value))
00231 
00232 #define AXIOM_ATTRIBUTE_CLONE(om_attribute, env) \
00233         ((om_attribute)->ops->clone(om_attribute, env))
00234 
00236 #ifdef __cplusplus
00237 }
00238 #endif
00239 
00240 #endif  /* AXIOM_ATTRIBUTE_H */

Generated on Wed Dec 20 20:14:09 2006 for Axis2/C by  doxygen 1.5.1