w2c_cmdline_option.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 W2C_CMDLINE_OPTION_H
00019 #define W2C_CMDLINE_OPTION_H
00020 
00026 #include <axis2_utils.h>
00027 #include <axis2_array_list.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00040 typedef struct w2c_cmdline_option w2c_cmdline_option_t;
00041 typedef struct w2c_cmdline_option_ops w2c_cmdline_option_ops_t;
00042 
00043 AXIS2_DECLARE_DATA  struct w2c_cmdline_option_ops
00044 {
00053     axis2_status_t (AXIS2_CALL *
00054     free)(w2c_cmdline_option_t *cmdline_option,
00055          const axis2_env_t *env);
00056 
00057     axis2_char_t *(AXIS2_CALL *
00058     get_type)(w2c_cmdline_option_t *cmdline_option,
00059           const axis2_env_t *env);
00060     
00061     axis2_char_t *(AXIS2_CALL *
00062     get_value)(w2c_cmdline_option_t *cmdline_option,
00063           const axis2_env_t *env);
00064 
00065     axis2_array_list_t *(AXIS2_CALL *
00066     get_values)(w2c_cmdline_option_t *cmdline_option,
00067           const axis2_env_t *env);
00068     
00069 };
00070 
00071 AXIS2_DECLARE_DATA  struct w2c_cmdline_option
00072 {
00073      struct w2c_cmdline_option_ops *ops;
00074 };
00075 
00083 AXIS2_EXTERN w2c_cmdline_option_t* AXIS2_CALL
00084 w2c_cmdline_option_create_with_values( const axis2_env_t *env,
00085                    axis2_char_t *type,
00086                    axis2_array_list_t *values_arr );
00087 
00088 /*************************** Function macros **********************************/
00089 
00090 #define W2C_CMDLINE_OPTION_FREE(cmdline_option, env) \
00091       ((cmdline_option)->ops->free (cmdline_option, env)) 
00092 
00093 #define W2C_CMDLINE_OPTION_GET_TYPE(cmdline_option, env) \
00094       ((cmdline_option)->ops->get_type (cmdline_option, env ))
00095 
00096 #define W2C_CMDLINE_OPTION_GET_VALUE(cmdline_option, env) \
00097       ((cmdline_option)->ops->get_value (cmdline_option, env ))
00098 
00099 #define W2C_CMDLINE_OPTION_GET_VALUES(cmdline_option, env) \
00100       ((cmdline_option)->ops->get_values (cmdline_option, env))
00101 
00102 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif /* W2C_CMDLINE_OPTION_H */

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