w2c_cmdline_option_parser.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_PARSER_H
00018 #define W2C_CMDLINE_OPTION_PARSER_H
00019 
00025 #include <axis2_utils.h>
00026 #include <axis2_hash.h>
00027 #include <axis2_array_list.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00040 typedef struct w2c_cmdline_option_parser w2c_cmdline_option_parser_t;
00041 typedef struct w2c_cmdline_option_parser_ops w2c_cmdline_option_parser_ops_t;
00042 
00043 AXIS2_DECLARE_DATA  struct w2c_cmdline_option_parser_ops
00044 {
00052     axis2_status_t (AXIS2_CALL *
00053     free)(w2c_cmdline_option_parser_t *cmdline_option_parser,
00054          const axis2_env_t *env);
00055 
00062     axis2_hash_t* (AXIS2_CALL *
00063     get_options)(w2c_cmdline_option_parser_t *cmdline_option_parser,
00064           const axis2_env_t *env);
00065     
00072     axis2_array_list_t* (AXIS2_CALL *
00073     get_invalid_options)(w2c_cmdline_option_parser_t *cmdline_option_parser,
00074           const axis2_env_t *env);
00075 
00076 };
00077 
00078 AXIS2_DECLARE_DATA  struct w2c_cmdline_option_parser
00079 {
00080     struct w2c_cmdline_option_parser_ops *ops;
00081 };
00082 
00090 AXIS2_EXTERN w2c_cmdline_option_parser_t* AXIS2_CALL
00091 w2c_cmdline_option_parser_create(const axis2_env_t *env,
00092                    int argc,
00093                    axis2_char_t **argv);
00094 
00095 /*************************** Function macros **********************************/
00096 
00097 #define W2C_CMDLINE_OPTION_PARSER_FREE(cmdline_option_parser, env) \
00098       ((cmdline_option_parser)->ops->free (cmdline_option_parser, env))
00099 
00100 #define W2C_CMDLINE_OPTION_PARSER_GET_OPTIONS(cmdline_option_parser, env) \
00101       ((cmdline_option_parser)->ops->get_options (cmdline_option_parser, env ))
00102 
00103 #define W2C_CMDLINE_OPTION_PARSER_GET_INVALID_OPTIONS(cmdline_option_parser, env) \
00104       ((cmdline_option_parser)->ops->get_invalid_options(cmdline_option_parser, env ))
00105 
00108 #ifdef __cplusplus
00109 }
00110 #endif
00111 
00112 #endif /* W2C_CMDLINE_OPTION_PARSER_H */

Generated on Thu Oct 26 21:11:24 2006 for Axis2/C by  doxygen 1.4.7