sphin_volume.h (2390B)
1 /* Copyright (C) 2024-2026 Centre National de la Recherche Scientifique 2 * Copyright (C) 2024-2026 Clermont Auvergne INP 3 * Copyright (C) 2024-2026 INSA Lyon 4 * Copyright (C) 2024-2026 Institut Mines Télécom Albi-Carmaux 5 * Copyright (C) 2024-2026 Institut National Polytechnique de Toulouse 6 * Copyright (C) 2024-2026 |Méso|Star> (contact@meso-star.com) 7 * Copyright (C) 2024-2026 PhotonLyX (info@photonlyx.com) 8 * Copyright (C) 2024-2026 Université de Lorraine 9 * Copyright (C) 2024-2026 Université Paul Sabatier 10 * Copyright (C) 2024-2026 Université Toulouse - Jean Jaurès 11 * 12 * This program is free software: you can redistribute it and/or modify 13 * it under the terms of the GNU General Public License as published by 14 * the Free Software Foundation, either version 3 of the License, or 15 * (at your option) any later version. 16 * 17 * This program is distributed in the hope that it will be useful, 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 * GNU General Public License for more details. 21 * 22 * You should have received a copy of the GNU General Public License 23 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 24 25 #ifndef SPHIN_VOLUME_H 26 #define SPHIN_VOLUME_H 27 28 #include "sphin_geometry.h" 29 #include "sphin_prop_rad.h" 30 31 #include <rsys/dynamic_array.h> 32 #include <rsys/ref_count.h> 33 #include <rsys/rsys.h> 34 #include <rsys/str.h> 35 36 struct sphin_config; 37 struct txtrdr; 38 39 struct sphin_volume { 40 struct str name; 41 struct sphin_refractive_index* refractive_index; 42 struct sphin_sensor_volume* sensor_volume; 43 struct darray_sphin_prop_rad_ptr prop_rads; 44 struct darray_sphin_geometry_ptr geometries; /* dynamic array of struct 45 geometry. see rsys/dynamic_array.h */ 46 struct sphin* sphin; 47 ref_T ref; 48 }; 49 50 extern LOCAL_SYM res_T 51 parse_volume 52 (struct sphin_config* config, 53 struct txtrdr* txtrdr, 54 const char* name); 55 56 /* Generate the dynamic array of pointers for the structure sphin_volume 57 * 58 * Refer to sphin_geometry.h to a more detailed explanation on this */ 59 #define DARRAY_NAME sphin_volume_ptr /* Prefix for api functions and structures: 60 darray_sphin_volume_ptr */ 61 #define DARRAY_DATA struct sphin_volume* 62 63 /* Generate the code */ 64 #include <rsys/dynamic_array.h> 65 66 #endif /* SPHIN_VOLUME_H */