ifw-odp 5.0.0
Loading...
Searching...
No Matches
clipm_compatibility_replacements.h
Go to the documentation of this file.
1
2/*********************************************************************
3 * E.S.O. - VLT project
4 *
5 * "@(#) $Id: clipm_compatibility_replacements.h 169734 2008-07-02 16:20:41Z hlorch $"
6 *
7 * Define the compatible CPL version
8 *
9 * who when what
10 * -------- ---------- ----------------------------------------------
11 * hlorch 2007-08-16 created
12 */
13
14#ifndef CLIPM_COMPATIBILITY_REPLACEMENTS_H
15#define CLIPM_COMPATIBILITY_REPLACEMENTS_H
16
17/*-----------------------------------------------------------------------------
18 Includes
19 -----------------------------------------------------------------------------*/
20
21#include <cpl.h>
23
24/*-----------------------------------------------------------------------------
25 Function replacements for CPL <= 3
26 -----------------------------------------------------------------------------*/
39#if CLIPM_GET_INSTALLED_CPL_VERSION <= 3
40
41 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42 * Constant accessor functions
43 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
45 #define cpl_array_get_data_int_const(array) \
46 cpl_array_get_data_int(array)
48 #define cpl_array_get_data_float_const(array) \
49 cpl_array_get_data_float(array)
51 #define cpl_array_get_data_double_const(array) \
52 cpl_array_get_data_double(array)
54 #define cpl_array_get_data_string_const(array) \
55 (const char**)cpl_array_get_data_string(array) /* whyever necessary */
57 #define cpl_bivector_get_x_const(bivector) \
58 cpl_bivector_get_x(bivector)
60 #define cpl_bivector_get_y_const(bivector) \
61 cpl_bivector_get_y(bivector)
63 #define cpl_bivector_get_x_data_const(bivector) \
64 cpl_bivector_get_x_data(bivector)
66 #define cpl_bivector_get_y_data_const(bivector) \
67 cpl_bivector_get_y_data(bivector)
69 #define cpl_frameset_find_const(frameset) \
70 cpl_frameset_find(frameset)
72 #define cpl_frameset_get_first_const(frameset) \
73 cpl_frameset_get_first(frameset)
75 #define cpl_frameset_get_next_const(frameset) \
76 cpl_frameset_get_next(frameset)
78 #define cpl_frameset_get_frame_const(frameset) \
79 cpl_frameset_get_frame(frameset)
81 #define cpl_image_get_bpm_const(image) \
82 cpl_image_get_bpm(image)
84 #define cpl_image_get_data_const(image) \
85 cpl_image_get_data(image)
87 #define cpl_image_get_data_double_const(image) \
88 cpl_image_get_data_double(image)
90 #define cpl_image_get_data_float_const(image) \
91 cpl_image_get_data_float(image)
93 #define cpl_image_get_data_int_const(image) \
94 cpl_image_get_data_int(image)
96 #define cpl_imagelist_get_const(imagelist) \
97 cpl_imagelist_get(imagelist)
99 #define cpl_mask_get_data_const(mask) \
100 cpl_mask_get_data(mask)
102 #define cpl_matrix_get_data_const(matrix) \
103 cpl_matrix_get_data(matrix)
105 #define cpl_parameterlist_find_const(parameterlist, name) \
106 cpl_parameterlist_find(parameterlist, name)
108 #define cpl_parameterlist_find_context_const(parameterlist, context) \
109 cpl_parameterlist_find_context(parameterlist, context)
111 #define cpl_parameterlist_find_tag_const(parameterlist, tag) \
112 cpl_parameterlist_find_tag(parameterlist, tag)
114 #define cpl_parameterlist_find_type_const(parameterlist, type) \
115 cpl_parameterlist_find_type(parameterlist, type)
117 #define cpl_parameterlist_get_first_const(parameterlist) \
118 cpl_parameterlist_get_first(parameterlist)
120 #define cpl_parameterlist_get_next_const(parameterlist) \
121 cpl_parameterlist_get_next(parameterlist)
123 #define cpl_parameterlist_get_last_const(parameterlist) \
124 cpl_parameterlist_get_last(parameterlist)
126 #define cpl_propertylist_get_const(propertylist) \
127 cpl_propertylist_get(propertylist)
129 #define cpl_propertylist_get_property_const(propertylist) \
130 cpl_propertylist_get_property(propertylist)
132 #define cpl_propertylist_get_first_const(propertylist) \
133 cpl_propertylist_get_first(propertylist)
135 #define cpl_propertylist_get_next_const(propertylist) \
136 cpl_propertylist_get_next(propertylist)
138 #define cpl_table_get_data_int_const(table) \
139 cpl_table_get_data_int(table)
141 #define cpl_table_get_data_float_const(table) \
142 cpl_table_get_data_float(table)
144 #define cpl_table_get_data_double_const(table) \
145 cpl_table_get_data_double(table)
147 #define cpl_table_get_data_string_const(table) \
148 cpl_table_get_data_string(table)
150 #define cpl_table_get_data_array_const(table) \
151 cpl_table_get_data_array(table)
153 #define cpl_vector_get_data_const(vector) \
154 cpl_vector_get_data(vector)
155
156 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 * Computational functions
158 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
159 #define cpl_vector_get_median_const(vector) \
160 cpl_vector_get_median(vector)
164 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 * Operational
166 *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
167 #define cpl_init(par) \
168 cpl_init()
171#endif
172
173/*
174 * CPL 4.1 provides mathematical constants. Replace them here if using older
175 * CPL.
176 */
177#ifndef CPL_MATH_CONST_H
178
179 /* The base of the exponential function */
180 #define CPL_MATH_E 2.7182818284590452353602874713526624977572470936999595
181
182 /* The ratio of a circles circumference to its diameter */
183 #define CPL_MATH_PI 3.1415926535897932384626433832795028841971693993751058
184
185 /* The natural logarithm of 2 */
186 #define CPL_MATH_LN2 0.6931471805599453094172321214581765680755001343602553
187
188 /* The natural logarithm of 10 */
189 #define CPL_MATH_LN10 2.3025850929940456840179914546843642076011014886287730
190
191 /* Derived constants */
192 /* 2pi */
193 #define CPL_MATH_2PI 6.2831853071795864769252867665590057683943387987502116
194
195 /* pi/2 */
196 #define CPL_MATH_PI_2 1.5707963267948966192313216916397514420985846996875529
197
198 /* pi/4 */
199 #define CPL_MATH_PI_4 0.7853981633974483096156608458198757210492923498437765
200
201 /* 1/pi */
202 #define CPL_MATH_1_PI 0.3183098861837906715377675267450287240689192914809129
203
204 /* 2/pi */
205 #define CPL_MATH_2_PI 0.6366197723675813430755350534900574481378385829618258
206
207 /* 4/pi */
208 #define CPL_MATH_4_PI 1.2732395447351626861510701069801148962756771659236516
209
210 /* sqrt(2pi) */
211 #define CPL_MATH_SQRT2PI 2.5066282746310005024157652848110452530069867406099383
212
213 /* 2/sqrt(pi) */
214 #define CPL_MATH_2_SQRTPI 1.1283791670955125738961589031215451716881012586579977
215
216 /* sqrt(2) */
217 #define CPL_MATH_SQRT2 1.4142135623730950488016887242096980785696718753769481
218
219 /* sqrt(3) */
220 #define CPL_MATH_SQRT3 1.7320508075688772935274463415058723669428052538103806
221
222 /* sqrt(1/2) */
223 #define CPL_MATH_SQRT1_2 0.7071067811865475244008443621048490392848359376884740
224
225 /* log2(e) */
226 #define CPL_MATH_LOG2E 1.4426950408889634073599246810018921374266459541529859
227
228 /* log10(e) */
229 #define CPL_MATH_LOG10E 0.4342944819032518276511289189166050822943970058036666
230
231 /* 180/pi */
232 #define CPL_MATH_DEG_RAD 57.295779513082320876798154814105170332405472466564322
233
234 /* pi/180 */
235 #define CPL_MATH_RAD_DEG 0.0174532925199432957692369076848861271344287188854173
236
237 /* FWHM per Sigma, 2.0*sqrt(2.0*log(2.0)) */
238 #define CPL_MATH_FWHM_SIG 2.3548200450309493820231386529193992754947713787716411
239
240 /* Sigma per FWHM, 0.5/sqrt(2.0*log(2.0)) */
241 #define CPL_MATH_SIG_FWHM 0.4246609001440095213607514170514448098575705468921770
242
243#endif
246/*----------------------------------------------------------------------------*/
247#endif /* CLIPM_COMPATIBILITY_REPLACEMENTS_H */