upgrading copyright year from 2015 to 2016
[hkl.git] / hkl / hkl-factory-private.h
blob366c78e303294acccb87aca512827a839eb3a3c3
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-2016 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>
22 #ifndef __HKL_FACTORY_PRIVATE_H__
23 #define __HKL_FACTORY_PRIVATE_H__
25 #include "hkl.h"
26 #include "hkl/ccan/autodata/autodata.h"
28 G_BEGIN_DECLS
30 typedef HklGeometry* (* HklFactoryGeometryFunction) (const HklFactory *factory);
31 typedef HklEngineList* (* HklFactoryEngineListFunction) (const HklFactory *factory);
33 struct _HklFactory
35 const char *name;
36 const char *description;
37 const darray_string axes;
38 HklFactoryGeometryFunction create_new_geometry;
39 HklFactoryEngineListFunction create_new_engine_list;
42 #define REGISTER_DIFFRACTOMETER(name_, real_name_, description_) \
43 static HklFactory name_ = { \
44 .name = real_name_, \
45 .description = description_, \
46 .axes = DARRAY(hkl_geometry_ ## name_ ## _axes), \
47 .create_new_geometry = &hkl_geometry_new_ ## name_, \
48 .create_new_engine_list = &hkl_engine_list_new_ ## name_ \
49 }; \
50 AUTODATA(factories, &name_)
52 AUTODATA_TYPE(factories, HklFactory);
54 G_END_DECLS
56 #endif /* __HKL_FACTORY_H__ */