NACO Pipeline Reference Manual  4.4.0
irplib_framelist.h
1 /* $Id: irplib_framelist.h,v 1.8 2008-11-20 10:24:47 llundin Exp $
2  *
3  * This file is part of the irplib package
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: llundin $
23  * $Date: 2008-11-20 10:24:47 $
24  * $Revision: 1.8 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef IRPLIB_FRAMELIST_H
29 #define IRPLIB_FRAMELIST_H
30 
31 /*-----------------------------------------------------------------------------
32  Includes
33  -----------------------------------------------------------------------------*/
34 
35 #include <cpl.h>
36 
37 /*-----------------------------------------------------------------------------
38  New type
39  -----------------------------------------------------------------------------*/
40 
41 typedef struct _irplib_framelist_ irplib_framelist;
42 
43 /*-----------------------------------------------------------------------------
44  Function prototypes
45  -----------------------------------------------------------------------------*/
46 
47 /* Constructors and destructor */
48 
49 irplib_framelist * irplib_framelist_new(void);
50 
51 void irplib_framelist_delete(irplib_framelist *);
52 
53 irplib_framelist * irplib_framelist_cast(const cpl_frameset *);
54 
55 irplib_framelist * irplib_framelist_extract(const irplib_framelist *,
56  const char *);
57 irplib_framelist * irplib_framelist_extract_regexp(const irplib_framelist *,
58  const char *, cpl_boolean);
59 
60 /* Accessors and element modifiers */
61 
62 int irplib_framelist_get_size(const irplib_framelist *);
63 
64 const cpl_frame * irplib_framelist_get_const(const irplib_framelist *, int);
65 
66 cpl_frame * irplib_framelist_get(irplib_framelist *, int);
67 
68 const cpl_propertylist * irplib_framelist_get_propertylist_const(
69  const irplib_framelist *,
70  int);
71 
72 cpl_propertylist * irplib_framelist_get_propertylist(irplib_framelist *, int);
73 
74 cpl_error_code irplib_framelist_set_propertylist(irplib_framelist *, int,
75  const cpl_propertylist *);
76 
77 cpl_error_code irplib_framelist_load_propertylist(irplib_framelist *, int,
78  int, const char *,
79  cpl_boolean);
80 
81 cpl_error_code irplib_framelist_load_propertylist_all(irplib_framelist *, int,
82  const char *,
83  cpl_boolean);
84 
85 cpl_error_code irplib_framelist_set_tag_all(irplib_framelist *, const char *);
86 
87 
88 /* Inserting and removing elements */
89 
90 cpl_error_code irplib_framelist_set(irplib_framelist *, cpl_frame *, int);
91 
92 cpl_error_code irplib_framelist_erase(irplib_framelist *, int);
93 
94 cpl_frame * irplib_framelist_unset(irplib_framelist *, int, cpl_propertylist **);
95 
96 void irplib_framelist_empty(irplib_framelist *);
97 
98 /* Others */
99 cpl_error_code irplib_framelist_contains(const irplib_framelist *, const char *,
100  cpl_type, cpl_boolean, double);
101 
102 cpl_imagelist * irplib_imagelist_load_framelist(const irplib_framelist *,
103  cpl_type, int, int);
104 
105 cpl_frameset * irplib_frameset_cast(const irplib_framelist *);
106 
107 #endif
cpl_imagelist * irplib_imagelist_load_framelist(const irplib_framelist *, cpl_type, int, int)
Load an imagelist from a framelist.
cpl_frameset * irplib_frameset_cast(const irplib_framelist *)
Create a CPL frameset from an irplib_framelist.
cpl_error_code irplib_framelist_set_tag_all(irplib_framelist *, const char *)
Set the tag of all frames in the list.
cpl_error_code irplib_framelist_set(irplib_framelist *, cpl_frame *, int)
Add a frame to a framelist.
irplib_framelist * irplib_framelist_extract_regexp(const irplib_framelist *, const char *, cpl_boolean)
Extract the frames with the given tag from a framelist.
const cpl_propertylist * irplib_framelist_get_propertylist_const(const irplib_framelist *, int)
Get the propertylist of the specified frame in the framelist.
void irplib_framelist_empty(irplib_framelist *)
Erase all frames from a framelist.
cpl_error_code irplib_framelist_load_propertylist_all(irplib_framelist *, int, const char *, cpl_boolean)
Load the propertylists of all frames in the framelist.
cpl_frame * irplib_framelist_unset(irplib_framelist *, int, cpl_propertylist **)
Erase a frame from a framelist and return it to the caller.
cpl_frame * irplib_framelist_get(irplib_framelist *, int)
Get the specified frame from the framelist.
cpl_error_code irplib_framelist_set_propertylist(irplib_framelist *, int, const cpl_propertylist *)
Duplicate a propertylist to the specified position in the framelist.
irplib_framelist * irplib_framelist_extract(const irplib_framelist *, const char *)
Extract the frames with the given tag from a framelist.
const cpl_frame * irplib_framelist_get_const(const irplib_framelist *, int)
Get the specified frame from the framelist.
void irplib_framelist_delete(irplib_framelist *)
Deallocate an irplib_framelist with its frames and properties.
cpl_error_code irplib_framelist_contains(const irplib_framelist *, const char *, cpl_type, cpl_boolean, double)
Verify that a property is present for all frames.
cpl_propertylist * irplib_framelist_get_propertylist(irplib_framelist *, int)
Get the propertylist of the specified frame in the framelist.
cpl_error_code irplib_framelist_load_propertylist(irplib_framelist *, int, int, const char *, cpl_boolean)
Load the propertylist of the specified frame in the framelist.
irplib_framelist * irplib_framelist_cast(const cpl_frameset *)
Create an irplib_framelist from a cpl_framelist.
irplib_framelist * irplib_framelist_new(void)
Create an empty framelist.
int irplib_framelist_get_size(const irplib_framelist *)
Get the size of a framelist.
cpl_error_code irplib_framelist_erase(irplib_framelist *, int)
Erase a frame from a framelist and delete it and its propertylist.