X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fdataset.h;h=dfa444356e816ada4aaeef6c52851d5e4b499003;hb=bf868380ccff985a9eeb4e40f307118548411e7c;hp=b2aa8bcf0e120a43c71fddf69295e5cb73d78c30;hpb=a9b46fb9e208c694e39d6f173bfa6fe631a30129;p=pspp diff --git a/src/data/dataset.h b/src/data/dataset.h index b2aa8bcf0e..dfa444356e 100644 --- a/src/data/dataset.h +++ b/src/data/dataset.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006, 2007, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. 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 @@ -21,17 +21,25 @@ #include #include "data/transformations.h" -#include "libpspp/compiler.h" struct casereader; struct dataset; struct dictionary; +struct session; +struct transformation; -struct dataset *dataset_create (void); +struct dataset *dataset_create (struct session *, const char *); +struct dataset *dataset_clone (struct dataset *, const char *); void dataset_destroy (struct dataset *); void dataset_clear (struct dataset *); +const char *dataset_name (const struct dataset *); +void dataset_set_name (struct dataset *, const char *); + +struct session *dataset_session (const struct dataset *); +void dataset_set_session (struct dataset *, struct session *); + struct dictionary *dataset_dict (const struct dataset *); void dataset_set_dict (struct dataset *, struct dictionary *); @@ -40,8 +48,7 @@ bool dataset_has_source (const struct dataset *ds); bool dataset_set_source (struct dataset *, struct casereader *); struct casereader *dataset_steal_source (struct dataset *); -void dataset_set_default_syntax_encoding (struct dataset *, const char *); -const char *dataset_get_default_syntax_encoding (const struct dataset *); +unsigned int dataset_seqno (const struct dataset *); struct dataset_callbacks { @@ -58,24 +65,31 @@ struct dataset_callbacks void dataset_set_callbacks (struct dataset *, const struct dataset_callbacks *, void *aux); + +/* Dataset GUI window display status. */ +enum dataset_display + { + DATASET_ASIS, /* Current state unchanged. */ + DATASET_FRONT, /* Display and raise to top. */ + DATASET_MINIMIZED, /* Display as icon. */ + DATASET_HIDDEN /* Do not display. */ + }; +enum dataset_display dataset_get_display (const struct dataset *); +void dataset_set_display (struct dataset *, enum dataset_display); /* Transformations. */ -void add_transformation (struct dataset *ds, - trns_proc_func *, trns_free_func *, void *); -void add_transformation_with_finalizer (struct dataset *ds, - trns_finalize_func *, - trns_proc_func *, - trns_free_func *, void *); -size_t next_transformation (const struct dataset *ds); +void add_transformation (struct dataset *ds, const struct trns_class *, void *); bool proc_cancel_all_transformations (struct dataset *ds); -struct trns_chain *proc_capture_transformations (struct dataset *ds); +void proc_push_transformations (struct dataset *); +void proc_pop_transformations (struct dataset *, struct trns_chain *); void proc_start_temporary_transformations (struct dataset *ds); bool proc_in_temporary_transformations (const struct dataset *ds); bool proc_make_temporary_transformations_permanent (struct dataset *ds); bool proc_cancel_temporary_transformations (struct dataset *ds); +struct variable *add_permanent_ordering_transformation (struct dataset *); /* Procedures. */ @@ -91,7 +105,15 @@ bool proc_commit (struct dataset *); bool dataset_end_of_command (struct dataset *); +struct measure_guesser *measure_guesser_create (struct dataset *); +void measure_guesser_run (struct measure_guesser *, const struct casereader *); +void measure_guesser_destroy (struct measure_guesser *); + const struct ccase *lagged_case (const struct dataset *ds, int n_before); void dataset_need_lag (struct dataset *ds, int n_before); + +/* Private interface for use by session code. */ + +void dataset_set_session__(struct dataset *, struct session *); #endif /* dataset.h */