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

axiom_attribute.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 AXIOM_ATTRIBUTE_H
00018 #define AXIOM_ATTRIBUTE_H
00019 
00024 #include <axis2_env.h>
00025 #include <axis2_qname.h>
00026 #include <axiom_namespace.h>
00027 #include <axiom_output.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00034     struct axiom_attribute;
00035     struct axiom_attribute_ops;
00036 
00047  AXIS2_DECLARE_DATA   typedef struct axiom_attribute_ops
00048     {
00057         axis2_status_t (AXIS2_CALL *
00058         free)(struct axiom_attribute *om_attribute,
00059               const axis2_env_t *env);
00060 
00069         axis2_qname_t * (AXIS2_CALL *
00070         get_qname)(struct axiom_attribute *om_attribute,
00071                    const axis2_env_t *env);
00072 
00081         int (AXIS2_CALL *
00082         serialize)(struct axiom_attribute *om_attribute,
00083                    const axis2_env_t *env,
00084                    axiom_output_t *om_output);
00085        
00091         axis2_char_t* (AXIS2_CALL *
00092         get_localname)(struct axiom_attribute *om_attribute,
00093                        const axis2_env_t *env);
00100         axis2_char_t* (AXIS2_CALL *
00101         get_value)(struct axiom_attribute *om_attribute,
00102                    const axis2_env_t *env);
00109         axiom_namespace_t* (AXIS2_CALL *
00110         get_namespace)(struct axiom_attribute *om_attribute,
00111                        const axis2_env_t *env);
00112        
00119         axis2_status_t (AXIS2_CALL *
00120         set_localname)(struct axiom_attribute *om_attribute,
00121                        const axis2_env_t *env,
00122                        const axis2_char_t *localname);
00123        
00131         axis2_status_t (AXIS2_CALL *
00132         set_value)(struct axiom_attribute *om_attribute,
00133                    const axis2_env_t *env,
00134                    const axis2_char_t *value);
00135        
00143         axis2_status_t (AXIS2_CALL *
00144         set_namespace)(struct axiom_attribute *om_attribute,
00145                        const axis2_env_t *env,
00146                        axiom_namespace_t *om_namespace);
00147 
00155         struct axiom_attribute* (AXIS2_CALL *
00156         clone)(struct axiom_attribute *om_attribute,
00157                const axis2_env_t *env);
00158 
00159 
00160     } axiom_attribute_ops_t;
00161 
00166     typedef struct axiom_attribute
00167     {
00169         axiom_attribute_ops_t *ops;
00170        
00171     } axiom_attribute_t;
00172 
00182     AXIS2_EXTERN axiom_attribute_t * AXIS2_CALL
00183     axiom_attribute_create (const axis2_env_t *env,
00184                                const axis2_char_t *localname,
00185                                const axis2_char_t *value,
00186                                axiom_namespace_t *ns);
00192     AXIS2_EXTERN axis2_status_t AXIS2_CALL 
00193     axiom_attribute_free_void_arg (
00194             void *om_attribute,
00195             const axis2_env_t *env);
00196      
00197 /******************** Macros **************************************************/
00198     
00199     
00201 #define AXIOM_ATTRIBUTE_FREE(om_attribute, env) \
00202         ((om_attribute)->ops->free(om_attribute, env))
00203         
00205 #define AXIOM_ATTRIBUTE_GET_QNAME(om_attribute,env) \
00206         ((om_attribute)->ops->get_qname(om_attribute, env))
00207         
00209 #define AXIOM_ATTRIBUTE_SERIALIZE(om_attribute, env, om_ouput) \
00210         ((om_attribute)->ops->serialize(om_attribute, env, om_output))
00211 
00212 #define AXIOM_ATTRIBUTE_GET_NAMESPACE(om_attribute, env) \
00213         ((om_attribute)->ops->get_namespace(om_attribute, env))
00214 
00215 #define AXIOM_ATTRIBUTE_GET_LOCALNAME(om_attribute, env) \
00216         ((om_attribute)->ops->get_localname(om_attribute, env))
00217 
00218 #define AXIOM_ATTRIBUTE_GET_VALUE(om_attribute, env) \
00219         ((om_attribute)->ops->get_value(om_attribute, env))
00220 
00221 #define AXIOM_ATTRIBUTE_SET_NAMESPACE(om_attribute, env,ns) \
00222         ((om_attribute)->ops->set_namespace(om_attribute, env,ns))
00223 
00224 #define AXIOM_ATTRIBUTE_SET_LOCALNAME(om_attribute, env,localname) \
00225         ((om_attribute)->ops->set_localname(om_attribute, env,localname))
00226 
00227 #define AXIOM_ATTRIBUTE_SET_VALUE(om_attribute, env,value) \
00228         ((om_attribute)->ops->set_value(om_attribute, env,value))
00229 
00230 #define AXIOM_ATTRIBUTE_CLONE(om_attribute, env) \
00231         ((om_attribute)->ops->clone(om_attribute, env))
00232 
00234 #ifdef __cplusplus
00235 }
00236 #endif
00237 
00238 #endif  /* AXIOM_ATTRIBUTE_H */

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