/[pspp]/psppire/src/pspp-dict.h
ViewVC logotype

Diff of /psppire/src/pspp-dict.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jmd, Wed Mar 30 11:54:12 2005 UTC revision 1.2 by jmd, Wed Oct 26 08:55:09 2005 UTC
# Line 22  Line 22 
22  #ifndef __PSPP_DICT_H__  #ifndef __PSPP_DICT_H__
23  #define __PSPP_DICT_H__  #define __PSPP_DICT_H__
24    
25    
26  #include <glib-object.h>  #include <glib-object.h>
27  #include <glib.h>  #include <glib.h>
28    
29    #include <dictionary.h>
30    #include <var.h>
31    
32  G_BEGIN_DECLS  G_BEGIN_DECLS
33    
34    
# Line 42  G_BEGIN_DECLS Line 46  G_BEGIN_DECLS
46  typedef struct _PSPP_Dict          PSPP_Dict;  typedef struct _PSPP_Dict          PSPP_Dict;
47  typedef struct _PSPP_DictClass PSPP_DictClass;  typedef struct _PSPP_DictClass PSPP_DictClass;
48    
   
 /* Pinched from the pspp code */  
 struct variable  
 {  
     char name[9];                
     int type;                    
     int width;  
 };  
   
49  struct _PSPP_Dict  struct _PSPP_Dict
50  {  {
51    GObject             parent;    GObject             parent;
52    GPtrArray           *array;    struct dictionary *dict;
53  };  };
54    
55  struct _PSPP_DictClass  struct _PSPP_DictClass
# Line 70  PSPP_Dict*     pspp_dict_new(void); Line 65  PSPP_Dict*     pspp_dict_new(void);
65  void           pspp_dict_set_name(PSPP_Dict* s, gint idx, const gchar *name);  void           pspp_dict_set_name(PSPP_Dict* s, gint idx, const gchar *name);
66  void           pspp_dict_delete_var(PSPP_Dict *s, gint idx);  void           pspp_dict_delete_var(PSPP_Dict *s, gint idx);
67    
68    /* Return the variable indexed by IDX.
69       returns NULL if IDX is not valid.
70    */
71    struct variable *pspp_dict_get_var(PSPP_Dict *d, gint idx);
72    
73    /* Return the number of variables in the dictionary */
74    gint pspp_dict_get_var_cnt(const PSPP_Dict *d);
75    
76    /* Return a variable by name.
77       Return NULL if it doesn't exist
78    */
79    struct variable * pspp_dict_lookup_var (const PSPP_Dict *d, const gchar *name);
80    
81    
82  G_END_DECLS  G_END_DECLS
83    
84  #endif /* __PSPP_DICT_H__ */  #endif /* __PSPP_DICT_H__ */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26