pxd: initial work
[pspp] / src / data / mrset.h
index c531db7a016791227c6bafba44e99e1ba9240a25..95b9784f7195242293e6de02708b3d3d1a4751a6 100644 (file)
@@ -43,6 +43,7 @@
 #include "data/value.h"
 
 struct dictionary;
+struct pxd;
 
 /* Type of a multiple response set. */
 enum mrset_type
@@ -61,8 +62,8 @@ enum mrset_md_cat_source
 /* A multiple response set. */
 struct mrset
   {
-    char *name;                 /* Name for syntax.  Always begins with "$". */
-    char *label;                /* Human-readable label for group. */
+    char *name;                 /* UTF-8 encoded name beginning with "$". */
+    char *label;                /* Human-readable UTF-8 label for group. */
     enum mrset_type type;       /* Group type. */
     struct variable **vars;     /* Constituent variables. */
     size_t n_vars;              /* Number of constituent variables. */
@@ -77,6 +78,13 @@ struct mrset
 struct mrset *mrset_clone (const struct mrset *);
 void mrset_destroy (struct mrset *);
 
+bool mrset_is_valid_name (const char *name, const char *dict_encoding,
+                          bool issue_error);
+
 bool mrset_ok (const struct mrset *, const struct dictionary *);
 
+struct pxd_object *mrset_save (const struct mrset *, struct pxd *);
+struct mrset *mrset_load (struct pxd_object *, const struct pxd *,
+                          const struct dictionary *);
+
 #endif /* data/mrset.h */