Common Pipeline Library Reference Manual
6.2
|
This module provides codes for the basic types (including char
, int
, float
, etc.) used in CPL. These type codes may be used to indicate the type of a value stored in another object, the value of a property or the pixel of an image for instance. In addition, a utility function is provided to compute the size, which is required to store a value of the type indicated by a given type code.
The module
#define CPL_SIZE_FORMAT |
The format specifier for the type cpl_size.
long
int and "d" when it is an int
It can be used like this:
Referenced by cpl_apertures_dump(), cpl_array_dump(), cpl_array_dump_structure(), cpl_fit_image_gaussian(), cpl_flux_get_noise_ring(), cpl_frameset_labelise(), cpl_geom_img_offset_combine(), cpl_geom_img_offset_fine(), cpl_image_dump_structure(), cpl_image_dump_window(), cpl_imagelist_load_frameset(), cpl_mask_dump_window(), cpl_matrix_decomp_chol(), cpl_matrix_dump(), cpl_matrix_fill_diagonal(), cpl_matrix_get_determinant(), cpl_plot_bivector(), cpl_plot_bivectors(), cpl_plot_columns(), cpl_plot_image(), cpl_plot_image_col(), cpl_plot_image_row(), cpl_plot_mask(), cpl_plot_vector(), cpl_plot_vectors(), cpl_polynomial_fit(), cpl_polynomial_get_coeff(), cpl_table_dump(), cpl_table_dump_structure(), cpl_table_save(), cpl_vector_dump(), cpl_vector_load(), cpl_vector_new(), and cpl_wcs_platesol().
#define CPL_SIZE_MAX |
Maximum value a variable of type cpl_size can hold.
#define CPL_SIZE_MIN |
Minimum value a variable of type cpl_size can hold.
static cpl_image cpl_size |
The type used for sizes and indices in CPL.
typedef enum _cpl_type_ cpl_type |
The type code type.
enum _cpl_type_ |
The CPL type codes and flags.
const char* cpl_type_get_name | ( | cpl_type | type) |
Get a string with the name of a type, e.g. "char", "int", "float".
type | Type code to be evaluated. |
References CPL_ERROR_INVALID_TYPE, CPL_TYPE_BOOL, CPL_TYPE_CHAR, CPL_TYPE_DOUBLE, CPL_TYPE_DOUBLE_COMPLEX, CPL_TYPE_FLAG_ARRAY, CPL_TYPE_FLOAT, CPL_TYPE_FLOAT_COMPLEX, CPL_TYPE_INT, CPL_TYPE_INVALID, CPL_TYPE_LONG, CPL_TYPE_LONG_LONG, CPL_TYPE_POINTER, CPL_TYPE_SHORT, CPL_TYPE_STRING, CPL_TYPE_UCHAR, CPL_TYPE_UINT, CPL_TYPE_ULONG, CPL_TYPE_UNSPECIFIED, and CPL_TYPE_USHORT.
Referenced by cpl_fit_image_gaussian(), cpl_image_dump_structure(), cpl_image_exponential(), cpl_image_logarithm(), cpl_image_power(), cpl_parameter_get_bool(), cpl_parameter_get_default_bool(), cpl_parameter_get_default_double(), cpl_parameter_get_default_int(), cpl_parameter_get_default_string(), cpl_parameter_get_double(), cpl_parameter_get_enum_double(), cpl_parameter_get_enum_int(), cpl_parameter_get_enum_size(), cpl_parameter_get_enum_string(), cpl_parameter_get_int(), cpl_parameter_get_range_max_double(), cpl_parameter_get_range_max_int(), cpl_parameter_get_range_min_double(), cpl_parameter_get_range_min_int(), cpl_parameter_get_string(), cpl_parameter_new_enum(), cpl_parameter_new_range(), cpl_parameter_new_value(), cpl_parameter_set_bool(), cpl_parameter_set_default_bool(), cpl_parameter_set_default_double(), cpl_parameter_set_default_int(), cpl_parameter_set_default_string(), cpl_parameter_set_double(), cpl_parameter_set_int(), cpl_parameter_set_string(), and cpl_propertylist_dump().
size_t cpl_type_get_sizeof | ( | cpl_type | type) |
Compute the size of a type.
type | Type code to be evaluated. |
The function computes the atomic size of the type type. The result for fundamental types like CPL_TYPE_FLOAT
is what you would expect from the C sizeof() operator. For arrays, i.e. types having the CPL_TYPE_FLAG_ARRAY
set the returned size is not the size of a pointer to CPL_TYPE_FLOAT
for instance, but the size of its fundamental type, i.e. the returned size is same as for the type CPL_TYPE_FLOAT
.
Especially for the type CPL_TYPE_STRING
, which is explicitly defined for convenience reasons, the size returned by this function is the size of CPL_TYPE_CHAR!
References CPL_TYPE_BOOL, CPL_TYPE_CHAR, CPL_TYPE_DOUBLE, CPL_TYPE_DOUBLE_COMPLEX, CPL_TYPE_FLAG_ARRAY, CPL_TYPE_FLOAT, CPL_TYPE_FLOAT_COMPLEX, CPL_TYPE_INT, CPL_TYPE_INVALID, CPL_TYPE_LONG, CPL_TYPE_LONG_LONG, CPL_TYPE_POINTER, CPL_TYPE_SHORT, CPL_TYPE_UCHAR, CPL_TYPE_UINT, CPL_TYPE_ULONG, CPL_TYPE_UNSPECIFIED, and CPL_TYPE_USHORT.
Referenced by cpl_fit_imagelist_polynomial_window(), cpl_image_copy(), cpl_image_duplicate(), cpl_image_filter(), cpl_image_filter_mask(), cpl_image_shift(), cpl_property_new(), cpl_property_new_array(), and cpl_test_get_bytes_image().