1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 A "lazy casereader" is a casereader that saves an underlying
20 casereader from the need to be instantiated in the case where
21 it is never used. If any casereader operation is ever
22 performed on a lazy casereader, it invokes a callback function
23 (provided by the lazy casereader's creator) to instantiate the
26 #ifndef DATA_LAZY_CASEREADER_H
27 #define DATA_LAZY_CASEREADER_H 1
30 #include "data/case.h"
32 struct casereader *lazy_casereader_create (const struct caseproto *,
34 struct casereader *(*) (void *aux),
36 unsigned long int *serial);
37 bool lazy_casereader_destroy (struct casereader *, unsigned long int serial);
39 #endif /* data/lazy-casereader.h */