/* $Id: cpl_array.h,v 1.5 2007/07/17 10:48:55 cizzo Exp $ * * This file is part of the ESO Common Pipeline Library * Copyright (C) 2001-2006 European Southern Observatory * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * $Author: cizzo $ * $Date: 2007/07/17 10:48:55 $ * $Revision: 1.5 $ * $Name: $ */ #ifndef CPL_ARRAY_H #define CPL_ARRAY_H #include #include #include CPL_BEGIN_DECLS typedef struct _cpl_array_ cpl_array; cpl_array *cpl_array_new(int, cpl_type); cpl_array *cpl_array_wrap_int(int *, int); cpl_array *cpl_array_wrap_float(float *, int); cpl_array *cpl_array_wrap_double(double *, int); cpl_array *cpl_array_wrap_string(char **, int); cpl_error_code cpl_array_copy_data(cpl_array *, const double *); cpl_error_code cpl_array_copy_data_int(cpl_array *, const int *); cpl_error_code cpl_array_copy_data_float(cpl_array *, const float *); cpl_error_code cpl_array_copy_data_double(cpl_array *, const double *); cpl_error_code cpl_array_copy_data_string(cpl_array *, const char **); void cpl_array_delete(cpl_array *); void *cpl_array_unwrap(cpl_array *); int cpl_array_get_size(const cpl_array *); cpl_type cpl_array_get_type(const cpl_array *); int cpl_array_has_invalid(const cpl_array *); int cpl_array_has_valid(const cpl_array *); int cpl_array_count_invalid(const cpl_array *); int *cpl_array_get_data_int(cpl_array *); const int *cpl_array_get_data_int_const(const cpl_array *); float *cpl_array_get_data_float(cpl_array *); const float *cpl_array_get_data_float_const(const cpl_array *); double *cpl_array_get_data_double(cpl_array *); const double *cpl_array_get_data_double_const(const cpl_array *); char **cpl_array_get_data_string(cpl_array *); const char **cpl_array_get_data_string_const(const cpl_array *); double cpl_array_get(const cpl_array *, int, int *); int cpl_array_get_int(const cpl_array *, int, int *); float cpl_array_get_float(const cpl_array *, int, int *); double cpl_array_get_double(const cpl_array *, int, int *); const char *cpl_array_get_string(const cpl_array *, int); cpl_error_code cpl_array_set(cpl_array *array, int, double); cpl_error_code cpl_array_set_int(cpl_array *, int, int); cpl_error_code cpl_array_set_float(cpl_array *, int, float); cpl_error_code cpl_array_set_double(cpl_array *, int, double); cpl_error_code cpl_array_set_string(cpl_array *, int, const char *); cpl_error_code cpl_array_set_invalid(cpl_array *, int); cpl_error_code cpl_array_fill_window(cpl_array *, int, int, double); cpl_error_code cpl_array_fill_window_int(cpl_array *, int, int, int); cpl_error_code cpl_array_fill_window_float(cpl_array *, int, int, float); cpl_error_code cpl_array_fill_window_double(cpl_array *, int, int, double); cpl_error_code cpl_array_fill_window_string(cpl_array *, int, int, const char *); cpl_error_code cpl_array_fill_window_invalid(cpl_array *, int, int); cpl_array *cpl_array_duplicate(const cpl_array *); CPL_END_DECLS #endif /* end of cpl_array.h */