upgrading copyright year from 2016 to 2017
[hkl.git] / hkl / hkl-unit-private.h
blob4452b1b0f38e899be29676e544e684f6e4cdc40f
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-2017 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_UNIT_PRIVATE_H__
23 #define __HKL_UNIT_PRIVATE_H__
25 #include "hkl.h" // for G_BEGIN_DECLS, etc
27 G_BEGIN_DECLS
29 typedef struct _HklUnit HklUnit;
31 typedef enum _HklUnitType /*< unit,prefix=HKL >*/
33 HKL_UNIT_ANGLE_DEG,
34 HKL_UNIT_ANGLE_RAD,
35 HKL_UNIT_LENGTH_NM,
36 HKL_UNIT_ANGLE_MRAD,
37 } HklUnitType;
39 struct _HklUnit
41 HklUnitType type;
42 char const *name;
43 char const *repr;
46 static HklUnit const hkl_unit_angle_deg = {HKL_UNIT_ANGLE_DEG, "Degree", "°"};
47 static HklUnit const hkl_unit_angle_rad = {HKL_UNIT_ANGLE_RAD, "Radian", "rad"};
48 static HklUnit const hkl_unit_length_nm = {HKL_UNIT_LENGTH_NM, "NanoMeter", "nm"};
49 static HklUnit const hkl_unit_angle_mrad = {HKL_UNIT_ANGLE_MRAD, "Milli Radian", "mrad"};
51 extern HklUnit *hkl_unit_dup(const HklUnit *self);
52 extern void hkl_unit_free(HklUnit *self);
54 extern int hkl_unit_compatible(const HklUnit *self, const HklUnit *unit);
56 extern double hkl_unit_factor(const HklUnit *self, const HklUnit *unit);
58 G_END_DECLS
60 #endif /* __HKL_UNIT_PRIVATE_H__ */