1 /* This file is part of the hkl library.
3 * The hkl library is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
8 * The hkl library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with the hkl library. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright (C) 2003-2014 Synchrotron SOLEIL
17 * L'Orme des Merisiers Saint-Aubin
18 * BP 48 91192 GIF-sur-YVETTE CEDEX
20 * Authors: Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>
25 #include <math.h> // for M_PI
26 #include <stddef.h> // for size_t
27 #include <stdio.h> // for FILE
28 #include <glib.h> // for g_set_error, GError etc
29 #include <hkl/ccan/darray/darray.h> // for darray
32 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
33 # define HKL_DEPRECATED __attribute__((__deprecated__))
34 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
35 # define HKL_DEPRECATED __declspec(deprecated)
37 # define HKL_DEPRECATED
40 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
41 # define HKL_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))
42 #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320)
43 # define HKL_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead"))
45 # define HKL_DEPRECATED_FOR(f) HKL_DEPRECATED
49 #define HKL_EPSILON 1e-6
50 #define HKL_DEGTORAD (M_PI/180.)
51 #define HKL_RADTODEG (180./M_PI)
54 #define HKL_TAU (2. * M_PI)
55 /* #define HKL_TAU 1 */
63 # define HKLAPI __attribute__ ((visibility("default")))
70 * @brief Used to export functions(by changing visibility).
75 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
76 # define HKL_ARG_NONNULL(...) __attribute__ ((__nonnull__(__VA_ARGS__)))
78 # define HKL_ARG_NONNULL(...)
81 #define _darray(type) type *item; size_t size; size_t alloc
85 typedef darray(const char *) darray_string
;
91 typedef struct _HklMatrix HklMatrix
;
93 HKLAPI HklMatrix
*hkl_matrix_new(void);
95 HKLAPI HklMatrix
*hkl_matrix_new_full(double m11
, double m12
, double m13
,
96 double m21
, double m22
, double m23
,
97 double m31
, double m32
, double m33
);
99 HKLAPI HklMatrix
*hkl_matrix_new_euler(double euler_x
, double euler_y
, double euler_z
);
101 HKLAPI
double hkl_matrix_get(const HklMatrix
*self
, unsigned int i
, unsigned int j
) HKL_ARG_NONNULL(1);
103 HKLAPI
void hkl_matrix_free(HklMatrix
*self
) HKL_ARG_NONNULL(1);
105 HKLAPI
void hkl_matrix_init(HklMatrix
*self
,
106 double m11
, double m12
, double m13
,
107 double m21
, double m22
, double m23
,
108 double m31
, double m32
, double m33
) HKL_ARG_NONNULL(1);
110 HKLAPI
int hkl_matrix_cmp(const HklMatrix
*self
, const HklMatrix
*m
) HKL_ARG_NONNULL(1, 2);
112 HKLAPI
void hkl_matrix_times_matrix(HklMatrix
*self
, const HklMatrix
*m
) HKL_ARG_NONNULL(1, 2);
118 typedef enum _HklUnitEnum
128 typedef struct _HklParameter HklParameter
;
132 HKLAPI HklParameter
*hkl_parameter_new_copy(const HklParameter
*self
) HKL_ARG_NONNULL(1);
134 HKLAPI
void hkl_parameter_free(HklParameter
*self
) HKL_ARG_NONNULL(1);
136 HKLAPI
const char *hkl_parameter_name_get(const HklParameter
*self
) HKL_ARG_NONNULL(1);
138 HKLAPI
const char *hkl_parameter_default_unit_get(const HklParameter
*self
) HKL_ARG_NONNULL(1);
140 HKLAPI
const char *hkl_parameter_user_unit_get(const HklParameter
*self
) HKL_ARG_NONNULL(1);
142 HKLAPI
double hkl_parameter_value_get(const HklParameter
*self
,
143 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1);
145 HKLAPI
int hkl_parameter_value_set(HklParameter
*self
, double value
,
146 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1);
148 HKLAPI
void hkl_parameter_min_max_get(const HklParameter
*self
, double *min
, double *max
,
149 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1, 2, 3);
151 HKLAPI
int hkl_parameter_min_max_set(HklParameter
*self
, double min
, double max
,
152 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1);
154 HKLAPI
int hkl_parameter_fit_get(const HklParameter
*self
) HKL_ARG_NONNULL(1);
156 HKLAPI
void hkl_parameter_fit_set(HklParameter
*self
, int fit
) HKL_ARG_NONNULL(1);
158 HKLAPI
void hkl_parameter_randomize(HklParameter
*self
) HKL_ARG_NONNULL(1);
164 typedef struct _HklDetector HklDetector
;
165 typedef enum _HklDetectorType
170 HKLAPI HklDetector
*hkl_detector_factory_new(HklDetectorType type
);
172 HKLAPI HklDetector
*hkl_detector_new_copy(const HklDetector
*src
) HKL_ARG_NONNULL(1);
174 HKLAPI
void hkl_detector_free(HklDetector
*self
) HKL_ARG_NONNULL(1);
176 HKLAPI
void hkl_detector_idx_set(HklDetector
*self
, int idx
) HKL_ARG_NONNULL(1);
178 HKLAPI
void hkl_detector_fprintf(FILE *f
, const HklDetector
*self
) HKL_ARG_NONNULL(1, 2);
184 typedef struct _HklGeometry HklGeometry
;
185 typedef struct _HklGeometryList HklGeometryList
;
186 typedef struct _HklGeometryListItem HklGeometryListItem
;
190 HKLAPI HklGeometry
*hkl_geometry_new_copy(const HklGeometry
*self
) HKL_ARG_NONNULL(1);
192 HKLAPI
void hkl_geometry_free(HklGeometry
*self
) HKL_ARG_NONNULL(1);
194 HKLAPI
int hkl_geometry_set(HklGeometry
*self
, const HklGeometry
*src
) HKL_ARG_NONNULL(1, 2);
196 HKLAPI
const darray_string
*hkl_geometry_axes_names_get(const HklGeometry
*self
) HKL_ARG_NONNULL(1);
198 HKLAPI
const HklParameter
*hkl_geometry_axis_get(const HklGeometry
*self
, const char *name
,
199 GError
**error
) HKL_ARG_NONNULL(1, 2);
201 HKLAPI
int hkl_geometry_axis_set(HklGeometry
*self
, const char *name
,
202 const HklParameter
*axis
,
203 GError
**error
) HKL_ARG_NONNULL(1, 2, 3);
205 HKLAPI
void hkl_geometry_axes_values_get(const HklGeometry
*self
,
206 double values
[], size_t n_values
,
207 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1, 2);
209 HKLAPI
int hkl_geometry_axes_values_set(HklGeometry
*self
,
210 double values
[], size_t n_values
,
211 HklUnitEnum unit_type
,
212 GError
**error
) HKL_ARG_NONNULL(1, 2);
214 HKLAPI
const char *hkl_geometry_name_get(const HklGeometry
*self
) HKL_ARG_NONNULL(1);
216 HKLAPI
double hkl_geometry_wavelength_get(const HklGeometry
*self
,
217 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1);
219 HKLAPI
int hkl_geometry_wavelength_set(HklGeometry
*self
, double wavelength
,
220 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1);
222 HKLAPI
void hkl_geometry_randomize(HklGeometry
*self
) HKL_ARG_NONNULL(1);
224 /* TODO after bissecting it seems that this method is slow (to replace) */
225 HKLAPI
int hkl_geometry_set_values_v(HklGeometry
*self
, HklUnitEnum unit_type
,
226 GError
**error
, ...) HKL_ARG_NONNULL(1);
228 HKLAPI
void hkl_geometry_fprintf(FILE *file
, const HklGeometry
*self
) HKL_ARG_NONNULL(1, 2);
230 /* HklGeometryList */
232 #define HKL_GEOMETRY_LIST_FOREACH(item, list) for((item)=hkl_geometry_list_items_first_get((list)); \
234 (item)=hkl_geometry_list_items_next_get((list), (item)))
236 HKLAPI
void hkl_geometry_list_free(HklGeometryList
*self
) HKL_ARG_NONNULL(1);
238 HKLAPI
size_t hkl_geometry_list_n_items_get(const HklGeometryList
*self
) HKL_ARG_NONNULL(1);
240 HKLAPI
const HklGeometryListItem
*hkl_geometry_list_items_first_get(const HklGeometryList
*self
) HKL_ARG_NONNULL(1);
242 HKLAPI
const HklGeometryListItem
*hkl_geometry_list_items_next_get(const HklGeometryList
*self
,
243 const HklGeometryListItem
*item
) HKL_ARG_NONNULL(1, 2);
245 /* HklGeometryListItem */
247 HKLAPI
const HklGeometry
*hkl_geometry_list_item_geometry_get(const HklGeometryListItem
*self
) HKL_ARG_NONNULL(1);
253 typedef struct _HklLattice HklLattice
;
254 typedef struct _HklSample HklSample
;
255 typedef struct _HklSampleReflection HklSampleReflection
;
259 HKLAPI HklLattice
*hkl_lattice_new(double a
, double b
, double c
,
260 double alpha
, double beta
, double gamma
,
263 HKLAPI HklLattice
*hkl_lattice_new_copy(const HklLattice
*self
) HKL_ARG_NONNULL(1);
265 HKLAPI HklLattice
*hkl_lattice_new_default(void);
267 HKLAPI
void hkl_lattice_free(HklLattice
*self
) HKL_ARG_NONNULL(1);
269 HKLAPI
const HklParameter
*hkl_lattice_a_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
271 HKLAPI
int hkl_lattice_a_set(HklLattice
*self
, const HklParameter
*parameter
,
272 GError
**error
) HKL_ARG_NONNULL(1, 2);
274 HKLAPI
const HklParameter
*hkl_lattice_b_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
276 HKLAPI
int hkl_lattice_b_set(HklLattice
*self
, const HklParameter
*parameter
,
277 GError
**error
) HKL_ARG_NONNULL(1, 2);
279 HKLAPI
const HklParameter
*hkl_lattice_c_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
281 HKLAPI
int hkl_lattice_c_set(HklLattice
*self
, const HklParameter
*parameter
,
282 GError
**error
) HKL_ARG_NONNULL(1, 2);
284 HKLAPI
const HklParameter
*hkl_lattice_alpha_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
286 HKLAPI
int hkl_lattice_alpha_set(HklLattice
*self
, const HklParameter
*parameter
,
287 GError
**error
) HKL_ARG_NONNULL(1, 2);
289 HKLAPI
const HklParameter
*hkl_lattice_beta_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
291 HKLAPI
int hkl_lattice_beta_set(HklLattice
*self
, const HklParameter
*parameter
,
292 GError
**error
) HKL_ARG_NONNULL(1, 2);
294 HKLAPI
const HklParameter
*hkl_lattice_gamma_get(const HklLattice
*self
) HKL_ARG_NONNULL(1);
296 HKLAPI
int hkl_lattice_gamma_set(HklLattice
*self
, const HklParameter
*parameter
,
297 GError
**error
) HKL_ARG_NONNULL(1, 2);
299 HKLAPI
int hkl_lattice_set(HklLattice
*self
,
300 double a
, double b
, double c
,
301 double alpha
, double beta
, double gamma
,
302 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1);
304 HKLAPI
void hkl_lattice_get(const HklLattice
*self
,
305 double *a
, double *b
, double *c
,
306 double *alpha
, double *beta
, double *gamma
,
307 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1, 2, 3, 4, 5, 6, 7);
309 HKLAPI
int hkl_lattice_get_B(const HklLattice
*self
, HklMatrix
*B
) HKL_ARG_NONNULL(1, 2);
311 HKLAPI
int hkl_lattice_get_1_B(const HklLattice
*self
, HklMatrix
*B
) HKL_ARG_NONNULL(1, 2);
313 HKLAPI
int hkl_lattice_reciprocal(const HklLattice
*self
, HklLattice
*reciprocal
) HKL_ARG_NONNULL(1, 2);
317 HKLAPI HklSample
*hkl_sample_new(const char *name
) HKL_ARG_NONNULL(1);
319 HKLAPI HklSample
*hkl_sample_new_copy(const HklSample
*self
) HKL_ARG_NONNULL(1);
321 HKLAPI
void hkl_sample_free(HklSample
*self
) HKL_ARG_NONNULL(1);
323 HKLAPI
const char *hkl_sample_name_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
325 HKLAPI
void hkl_sample_name_set(HklSample
*self
, const char *name
) HKL_ARG_NONNULL(1, 2);
327 HKLAPI
const HklLattice
*hkl_sample_lattice_get(HklSample
*self
) HKL_ARG_NONNULL(1);
329 HKLAPI
void hkl_sample_lattice_set(HklSample
*self
, const HklLattice
*lattice
) HKL_ARG_NONNULL(1, 2);
331 HKLAPI
const HklParameter
*hkl_sample_ux_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
333 HKLAPI
int hkl_sample_ux_set(HklSample
*self
, const HklParameter
*ux
,
334 GError
**error
) HKL_ARG_NONNULL(1, 2);
336 HKLAPI
const HklParameter
*hkl_sample_uy_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
338 HKLAPI
int hkl_sample_uy_set(HklSample
*self
, const HklParameter
*uy
,
339 GError
**error
) HKL_ARG_NONNULL(1, 2);
341 HKLAPI
const HklParameter
*hkl_sample_uz_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
343 HKLAPI
int hkl_sample_uz_set(HklSample
*self
, const HklParameter
*uz
,
344 GError
**error
) HKL_ARG_NONNULL(1, 2);
346 HKLAPI
const HklMatrix
*hkl_sample_U_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
348 HKLAPI
void hkl_sample_U_set(HklSample
*self
, const HklMatrix
*U
) HKL_ARG_NONNULL(1);
350 HKLAPI
const HklMatrix
*hkl_sample_UB_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
352 HKLAPI
int hkl_sample_UB_set(HklSample
*self
, const HklMatrix
*UB
,
353 GError
**error
) HKL_ARG_NONNULL(1, 2);
355 HKLAPI
size_t hkl_sample_n_reflections_get(const HklSample
*self
) HKL_ARG_NONNULL(1);
357 #define HKL_SAMPLE_REFLECTIONS_FOREACH(_item, _list) for((_item)=hkl_sample_reflections_first_get((_list)); \
359 (_item)=hkl_sample_reflections_next_get((_list), (_item)))
361 HKLAPI HklSampleReflection
*hkl_sample_reflections_first_get(HklSample
*self
) HKL_ARG_NONNULL(1);
363 HKLAPI HklSampleReflection
*hkl_sample_reflections_next_get(HklSample
*self
,
364 HklSampleReflection
*reflection
) HKL_ARG_NONNULL(1, 2);
366 HKLAPI
void hkl_sample_del_reflection(HklSample
*self
,
367 HklSampleReflection
*reflection
) HKL_ARG_NONNULL(1, 2);
369 HKLAPI
void hkl_sample_add_reflection(HklSample
*self
,
370 HklSampleReflection
*reflection
) HKL_ARG_NONNULL(1, 2);
372 HKLAPI
int hkl_sample_compute_UB_busing_levy(HklSample
*self
,
373 const HklSampleReflection
*r1
,
374 const HklSampleReflection
*r2
,
375 GError
**error
) HKL_ARG_NONNULL(1, 2, 3);
377 HKLAPI
double hkl_sample_get_reflection_mesured_angle(const HklSample
*self
,
378 const HklSampleReflection
*r1
,
379 const HklSampleReflection
*r2
) HKL_ARG_NONNULL(1, 2, 3);
381 HKLAPI
double hkl_sample_get_reflection_theoretical_angle(const HklSample
*self
,
382 const HklSampleReflection
*r1
,
383 const HklSampleReflection
*r2
) HKL_ARG_NONNULL(1, 2, 3);
385 HKLAPI
int hkl_sample_affine(HklSample
*self
, GError
**error
) HKL_ARG_NONNULL(1);
387 /* HklSampleReflection */
389 HKLAPI HklSampleReflection
*hkl_sample_reflection_new(const HklGeometry
*geometry
,
390 const HklDetector
*detector
,
391 double h
, double k
, double l
,
392 GError
**error
) HKL_ARG_NONNULL(1, 2);
394 HKLAPI
void hkl_sample_reflection_hkl_get(const HklSampleReflection
*self
,
395 double *h
, double *k
, double *l
) HKL_ARG_NONNULL(1, 2, 3, 4);
397 HKLAPI
int hkl_sample_reflection_hkl_set(HklSampleReflection
*self
,
398 double h
, double k
, double l
,
399 GError
**error
) HKL_ARG_NONNULL(1);
401 HKLAPI
int hkl_sample_reflection_flag_get(const HklSampleReflection
*self
) HKL_ARG_NONNULL(1);
403 HKLAPI
void hkl_sample_reflection_flag_set(HklSampleReflection
*self
, int flag
) HKL_ARG_NONNULL(1);
405 HKLAPI
const HklGeometry
*hkl_sample_reflection_geometry_get(HklSampleReflection
*self
) HKL_ARG_NONNULL(1);
407 HKLAPI
void hkl_sample_reflection_geometry_set(HklSampleReflection
*self
,
408 const HklGeometry
*geometry
) HKL_ARG_NONNULL(1, 2);
414 typedef struct _HklEngine HklEngine
;
415 typedef struct _HklEngineList HklEngineList
;
417 typedef darray(HklEngine
*) darray_engine
;
421 HKLAPI
const char *hkl_engine_name_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
423 HKLAPI
unsigned int hkl_engine_len(const HklEngine
*self
) HKL_ARG_NONNULL(1);
425 HKLAPI
const darray_string
*hkl_engine_pseudo_axes_names_get(HklEngine
*self
) HKL_ARG_NONNULL(1);
427 HKLAPI
int hkl_engine_pseudo_axes_values_get(HklEngine
*self
,
428 double values
[], size_t n_values
,
429 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1, 2);
431 HKLAPI HklGeometryList
*hkl_engine_pseudo_axes_values_set(HklEngine
*self
,
432 double values
[], size_t n_values
,
433 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1, 2);
435 HKLAPI
const HklParameter
*hkl_engine_pseudo_axis_get(const HklEngine
*self
,
437 GError
**error
) HKL_ARG_NONNULL(1, 2);
439 typedef enum _HklEngineCapabilities
441 HKL_ENGINE_CAPABILITIES_READABLE
= 1u << 0,
442 HKL_ENGINE_CAPABILITIES_WRITABLE
= 1u << 1,
443 HKL_ENGINE_CAPABILITIES_INITIALIZABLE
= 1u << 2,
444 } HklEngineCapabilities
;
446 HKLAPI
unsigned int hkl_engine_capabilities_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
448 HKLAPI
int hkl_engine_initialized_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
450 HKLAPI
int hkl_engine_initialized_set(HklEngine
*self
, int initialized
,
451 GError
**error
) HKL_ARG_NONNULL(1);
453 HKLAPI
void hkl_engine_fprintf(FILE *f
, const HklEngine
*self
) HKL_ARG_NONNULL(1, 2);
457 HKLAPI
const darray_string
*hkl_engine_modes_names_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
459 HKLAPI
const char *hkl_engine_current_mode_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
461 HKLAPI
int hkl_engine_current_mode_set(HklEngine
*self
, const char *mode
, GError
**error
) HKL_ARG_NONNULL(1, 2);
463 typedef enum _HklEngineAxesNamesGet
465 HKL_ENGINE_AXES_NAMES_GET_READ
,
466 HKL_ENGINE_AXES_NAMES_GET_WRITE
,
467 } HklEngineAxesNamesGet
;
469 HKLAPI
const darray_string
*hkl_engine_axes_names_get(const HklEngine
*self
,
470 HklEngineAxesNamesGet mode
) HKL_ARG_NONNULL(1);
472 HKLAPI
const darray_string
*hkl_engine_parameters_names_get(const HklEngine
*self
) HKL_ARG_NONNULL(1);
474 HKLAPI
const HklParameter
*hkl_engine_parameter_get(const HklEngine
*self
, const char *name
,
475 GError
**error
) HKL_ARG_NONNULL(1, 2);
477 HKLAPI
int hkl_engine_parameter_set(HklEngine
*self
,
478 const char *name
, const HklParameter
*parameter
,
479 GError
**error
) HKL_ARG_NONNULL(1, 2, 3);
481 HKLAPI
void hkl_engine_parameters_values_get(const HklEngine
*self
,
482 double values
[], size_t n_values
,
483 HklUnitEnum unit_type
) HKL_ARG_NONNULL(1, 2);
485 HKLAPI
int hkl_engine_parameters_values_set(HklEngine
*self
,
486 double values
[], size_t n_values
,
487 HklUnitEnum unit_type
, GError
**error
) HKL_ARG_NONNULL(1, 2);
491 HKLAPI
void hkl_engine_list_free(HklEngineList
*self
) HKL_ARG_NONNULL(1);
493 HKLAPI darray_engine
*hkl_engine_list_engines_get(HklEngineList
*self
) HKL_ARG_NONNULL(1);
495 HKLAPI HklGeometry
*hkl_engine_list_geometry_get(HklEngineList
*self
) HKL_ARG_NONNULL(1);
497 HKLAPI
int hkl_engine_list_geometry_set(HklEngineList
*self
, const HklGeometry
*geometry
) HKL_ARG_NONNULL(1, 2);
499 HKLAPI
int hkl_engine_list_select_solution(HklEngineList
*self
,
500 const HklGeometryListItem
*item
) HKL_ARG_NONNULL(1);
502 HKLAPI HklEngine
*hkl_engine_list_engine_get_by_name(HklEngineList
*self
,
504 GError
**error
) HKL_ARG_NONNULL(1, 2);
506 HKLAPI
void hkl_engine_list_init(HklEngineList
*self
,
507 HklGeometry
*geometry
,
508 HklDetector
*detector
,
509 HklSample
*sample
) HKL_ARG_NONNULL(1, 2, 3, 4);
511 HKLAPI
int hkl_engine_list_get(HklEngineList
*self
) HKL_ARG_NONNULL(1);
513 HKLAPI
void hkl_engine_list_fprintf(FILE *f
,
514 const HklEngineList
*self
) HKL_ARG_NONNULL(1, 2);
520 typedef struct _HklFactory HklFactory
;
522 HKLAPI HklFactory
**hkl_factory_get_all(unsigned int *n
) HKL_ARG_NONNULL(1);
524 HKLAPI HklFactory
*hkl_factory_get_by_name(const char *name
,
525 GError
**error
) HKL_ARG_NONNULL(1);
527 HKLAPI
const char *hkl_factory_name_get(const HklFactory
*self
) HKL_ARG_NONNULL(1);
529 HKLAPI HklGeometry
*hkl_factory_create_new_geometry(const HklFactory
*self
) HKL_ARG_NONNULL(1);
531 HKLAPI HklEngineList
*hkl_factory_create_new_engine_list(const HklFactory
*self
) HKL_ARG_NONNULL(1);