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

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