/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/utils/eh_opt_context.h

Go to the documentation of this file.
00001 //---
00002 //
00003 // This file is part of sedflux.
00004 //
00005 // sedflux is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 2 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // sedflux is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with sedflux; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //
00019 //---
00020 
00021 #ifndef __EH_OPT_CONTEXT_H__
00022 #define __EH_OPT_CONTEXT_H__
00023 
00024 #include <stdio.h>
00025 #include <glib.h>
00026 #include <utils/eh_types.h>
00027 
00028 new_handle( Eh_opt_context );
00029 
00030 typedef struct
00031 {
00032    const gchar* long_name;
00033    gchar short_name;
00034 
00035    const gchar* description;
00036    const gchar* arg_description;
00037 
00038    const gchar* default_val;
00039 }
00040 Eh_opt_entry;
00041 
00042 //---
00043 // Public member function.
00044 //---
00045 
00046 Eh_opt_context eh_opt_create_context   ( const gchar* name        ,
00047                                          const gchar* description ,
00048                                          const gchar* help_description );
00049 Eh_opt_context eh_destroy_context      ( Eh_opt_context context );
00050 Eh_opt_context eh_opt_set_context      ( Eh_opt_context context ,
00051                                          Eh_opt_entry* entries );
00052 gboolean       eh_opt_parse_context( Eh_opt_context context ,
00053                                          gint* argc             ,
00054                                          gchar*** argv          , 
00055                                          GError** error );
00056 void           eh_opt_print_label_value( Eh_opt_context context , char *label );
00057 
00058 char*          eh_opt_value            ( Eh_opt_context context , char* label );
00059 char*          eh_opt_str_value        ( Eh_opt_context c , char* label );
00060 gboolean       eh_opt_bool_value       ( Eh_opt_context c , char *label );
00061 int            eh_opt_key_value        ( Eh_opt_context c , char *label ,
00062                                          char *keys[] );
00063 gint           eh_opt_int_value        ( Eh_opt_context c , char *label );
00064 double         eh_opt_dbl_value        ( Eh_opt_context c , char *label );
00065 
00066 void           eh_opt_print_key_file   ( Eh_opt_context c , FILE *fp );
00067 void           eh_opt_print_all_opts   ( Eh_opt_context c , FILE *fp );
00068 
00069 
00070 #endif
00071 

Generated on Fri Jan 4 18:04:16 2008 for sedflux by  doxygen 1.5.2