cg_args.h (1767B)
1 /* Copyright (C) 2022 Université de Pau et des Pays de l'Adour UPPA 2 * Copyright (C) 2022 CNRS 3 * Copyright (C) 2022 Sorbonne Université 4 * Copyright (C) 2022 Université Paul Sabatier 5 * Copyright (C) 2022 |Meso|Star> (contact@meso-star.com) 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 #ifndef PARSE_ARGS_H 21 #define PARSE_ARGS_H 22 23 #include <rsys/rsys.h> 24 #include <rsys/dynamic_array.h> 25 26 struct logger; 27 struct mem_allocator; 28 29 #define DARRAY_NAME names 30 #define DARRAY_DATA const char* 31 #include <rsys/dynamic_array.h> 32 33 struct args { 34 struct mem_allocator* allocator; 35 struct logger* logger; 36 char* city_filename; 37 char* stardis_basename; 38 struct darray_names catalog_files; 39 struct darray_names dump_footprint_names; 40 int binary_export; 41 int verbosity_level; 42 int print_help; 43 int print_version; 44 int single_thread; 45 int keep_running_on_errors; 46 int dump_footprints_level; 47 int no_escape; 48 }; 49 50 res_T 51 parse_args 52 (struct mem_allocator* allocator, 53 struct logger* logger, 54 int argc, 55 char** argv, 56 struct args** out_args); 57 58 void 59 release_args 60 (struct args* args); 61 62 void 63 print_version(void); 64 65 void 66 short_help(void); 67 68 #endif /*PARSE_ARGS_H*/