UVES Pipeline Reference Manual  5.4.6
uves_deque.h
1 /*===========================================================================
2  Copyright (C) 2001 European Southern Observatory (ESO)
3 
4  This program is free software; you can redistribute it and/or
5  modify it under the terms of the GNU General Public License as
6  published by the Free Software Foundation; either version 2 of
7  the License, or (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public
15  License along with this program; if not, write to the Free
16  Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
17  MA 02139, USA.
18 
19  Corresponding concerning ESO-MIDAS should be addressed as follows:
20  Internet e-mail: midas@eso.org
21  Postal address: European Southern Observatory
22  Data Management Division
23  Karl-Schwarzschild-Strasse 2
24  D 85748 Garching bei Muenchen
25  GERMANY
26 ===========================================================================*/
27 #ifndef UVES_DEQUE_H
28 #define UVES_DEQUE_H
29 
30 #include <cxtypes.h>
31 #include <assert.h>
32 #include <stdlib.h>
33 
34 typedef struct _uves_deque_ uves_deque;
35 
36 typedef unsigned long uves_deque_const_iterator;
37 typedef unsigned long uves_deque_iterator;
38 
39 uves_deque *
40 uves_deque_new(void);
41 void
42 uves_deque_push_back(uves_deque *d, cxptr what);
43 void uves_deque_push_front(uves_deque *d, cxptr what);
44 cxptr uves_deque_get(const uves_deque *d, uves_deque_const_iterator indx);
45 uves_deque_iterator uves_deque_erase(uves_deque *d, uves_deque_iterator indx, cx_free_func deallocate);
46 void uves_deque_insert(uves_deque *d, uves_deque_iterator indx, cxptr what);
47 cxsize
48 uves_deque_size(const uves_deque *d);
49 void uves_deque_destroy(uves_deque *d, cx_free_func deallocate);
50 cxbool uves_deque_empty(const uves_deque *d);
51 uves_deque_iterator uves_deque_begin(const uves_deque *d);
52 uves_deque_iterator uves_deque_end(const uves_deque *d);
53 uves_deque_iterator uves_deque_next(const uves_deque *d, uves_deque_const_iterator i);
54 #endif