CR2RE Pipeline Reference Manual 1.7.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
41typedef struct _irplib_framelist_ irplib_framelist;
42
43/*-----------------------------------------------------------------------------
44 Function prototypes
45 -----------------------------------------------------------------------------*/
46
47/* Constructors and destructor */
48
49irplib_framelist *irplib_framelist_new(void);
50
51void irplib_framelist_delete(irplib_framelist *);
52
53irplib_framelist *irplib_framelist_cast(const cpl_frameset *);
54
55irplib_framelist *
56irplib_framelist_extract(const irplib_framelist *, const char *);
57irplib_framelist *irplib_framelist_extract_regexp(const irplib_framelist *,
58 const char *,
59 cpl_boolean);
60
61/* Accessors and element modifiers */
62
63int irplib_framelist_get_size(const irplib_framelist *);
64
65const cpl_frame *irplib_framelist_get_const(const irplib_framelist *, int);
66
67cpl_frame *irplib_framelist_get(irplib_framelist *, int);
68
69const cpl_propertylist *
70irplib_framelist_get_propertylist_const(const irplib_framelist *, int);
71
72cpl_propertylist *irplib_framelist_get_propertylist(irplib_framelist *, int);
73
74cpl_error_code irplib_framelist_set_propertylist(irplib_framelist *,
75 int,
76 const cpl_propertylist *);
77
78cpl_error_code irplib_framelist_load_propertylist(irplib_framelist *,
79 int,
80 int,
81 const char *,
82 cpl_boolean);
83
84cpl_error_code irplib_framelist_load_propertylist_all(irplib_framelist *,
85 int,
86 const char *,
87 cpl_boolean);
88
89cpl_error_code irplib_framelist_set_tag_all(irplib_framelist *, const char *);
90
91
92/* Inserting and removing elements */
93
94cpl_error_code irplib_framelist_set(irplib_framelist *, cpl_frame *, int);
95
96cpl_error_code irplib_framelist_erase(irplib_framelist *, int);
97
98cpl_frame *irplib_framelist_unset(irplib_framelist *, int, cpl_propertylist **);
99
100void irplib_framelist_empty(irplib_framelist *);
101
102/* Others */
103cpl_error_code irplib_framelist_contains(const irplib_framelist *,
104 const char *,
105 cpl_type,
106 cpl_boolean,
107 double);
108
109cpl_imagelist *
110irplib_imagelist_load_framelist(const irplib_framelist *, cpl_type, int, int);
111
112cpl_frameset *irplib_frameset_cast(const irplib_framelist *);
113
114#endif
int irplib_framelist_get_size(const irplib_framelist *)
Get the size of a framelist.
cpl_frame * irplib_framelist_unset(irplib_framelist *, int, cpl_propertylist **)
Erase a frame from a framelist and return it to the caller.
cpl_error_code irplib_framelist_set(irplib_framelist *, cpl_frame *, int)
Add a frame to a framelist.
cpl_frameset * irplib_frameset_cast(const irplib_framelist *)
Create a CPL frameset from an irplib_framelist.
irplib_framelist * irplib_framelist_extract(const irplib_framelist *, const char *)
Extract the frames with the given tag from 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.
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.
cpl_frame * irplib_framelist_get(irplib_framelist *, int)
Get the specified frame from the framelist.
irplib_framelist * irplib_framelist_cast(const cpl_frameset *)
Create an irplib_framelist from a cpl_framelist.
void irplib_framelist_delete(irplib_framelist *)
Deallocate an irplib_framelist with its frames and properties.
void irplib_framelist_empty(irplib_framelist *)
Erase all frames from a 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_erase(irplib_framelist *, int)
Erase a frame from a framelist and delete it and its propertylist.
cpl_error_code irplib_framelist_set_propertylist(irplib_framelist *, int, const cpl_propertylist *)
Duplicate a propertylist to the specified position in the framelist.
cpl_propertylist * irplib_framelist_get_propertylist(irplib_framelist *, int)
Get the propertylist of the specified frame in the framelist.
irplib_framelist * irplib_framelist_new(void)
Create an empty framelist.
const cpl_propertylist * irplib_framelist_get_propertylist_const(const irplib_framelist *, int)
Get the propertylist of the specified frame in the framelist.
const cpl_frame * irplib_framelist_get_const(const irplib_framelist *, int)
Get the specified frame from the 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_imagelist * irplib_imagelist_load_framelist(const irplib_framelist *, cpl_type, int, int)
Load an imagelist from a framelist.
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.