pxd: initial work
[pspp] / src / data / value-labels.h
index af98d9f9b54ef392f7623f7a3f3d050bb60b5bfb..e2d4b364092b5c9915ed0fd29cc1e04e8267eb53 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009, 2011, 2012 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2009-2012 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
@@ -30,6 +30,8 @@
 #include "data/value.h"
 #include "libpspp/hmap.h"
 
+struct pxd;
+
 /* One value label.
 
    A value label is normally part of a struct val_labs (see
@@ -37,6 +39,7 @@
 struct val_lab
   {
     struct hmap_node node;      /* Node in hash map. */
+    struct pxd_object *cache;   /* Object cache. */
     union value value;          /* The value being labeled. */
     const char *label;          /* An interned string. */
     const char *escaped_label;  /* An interned string. */
@@ -78,6 +81,7 @@ val_lab_get_escaped_label (const struct val_lab *vl)
 /* A set of value labels. */
 struct val_labs
   {
+    struct pxd_object *cache;   /* Object cache. */
     int width;                  /* 0=numeric, otherwise string width. */
     struct hmap labels;         /* Hash table of `struct val_lab's. */
   };
@@ -117,4 +121,8 @@ const struct val_lab **val_labs_sorted (const struct val_labs *);
 unsigned int val_labs_hash (const struct val_labs *, unsigned int basis);
 bool val_labs_equal (const struct val_labs *, const struct val_labs *);
 
+/* Saving and loading. */
+struct pxd_object *val_labs_save (const struct val_labs *, struct pxd *);
+struct val_labs *val_labs_load (struct pxd_object *, const struct pxd *);
+
 #endif /* data/value-labels.h */