subcase
[pspp] / src / data / subcase.h
index 71bf6fd7cc33d4227a4e3c4380f6773a1bfc599a..88992bb9dd927c4c5bb7ce0fcc6ca82ceb78f0de 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 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
@@ -67,18 +67,28 @@ bool subcase_add (struct subcase *, int case_index, int width,
                  enum subcase_direction direction);
 bool subcase_add_var (struct subcase *, const struct variable *,
                       enum subcase_direction);
+void subcase_add_vars (struct subcase *, const struct variable *const *,
+                       size_t n_vars, enum subcase_direction);
 
 void subcase_add_always (struct subcase *sc, int case_index, int width,
                          enum subcase_direction direction);
 void subcase_add_var_always (struct subcase *, const struct variable *,
                              enum subcase_direction);
+void subcase_add_vars_always (struct subcase *, const struct variable *const *,
+                              size_t n_vars, enum subcase_direction);
 void subcase_add_proto_always (struct subcase *, const struct caseproto *);
 
+void subcase_concat (struct subcase *, const struct subcase *);
+void subcase_concat_always (struct subcase *, const struct subcase *);
+
+void subcase_project (struct subcase *, size_t offset);
+
 const struct caseproto *subcase_get_proto (const struct subcase *);
 
 static inline bool subcase_is_empty (const struct subcase *);
 static inline size_t subcase_get_n_fields (const struct subcase *);
 
+static inline size_t subcase_get_width (const struct subcase *, size_t idx);
 static inline size_t subcase_get_case_index (const struct subcase *,
                                              size_t idx);
 static inline enum subcase_direction subcase_get_direction (
@@ -116,6 +126,12 @@ subcase_get_case_index (const struct subcase *sc, size_t idx)
   return sc->fields[idx].case_index;
 }
 
+static inline size_t
+subcase_get_width (const struct subcase *sc, size_t idx)
+{
+  return sc->fields[idx].width;
+}
+
 static inline enum subcase_direction
 subcase_get_direction (const struct subcase *sc, size_t idx)
 {