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

Generated on Tue Oct 3 22:35:48 2006 for Axis2/C by  doxygen 1.4.7