1 /* -*- c++ -*-
2 FILE: Preferences.h
3 RCS REVISION: $Revision: 1.8 $
4 
5 COPYRIGHT: (c) 1999 -- 2003 Melinda Green, Don Hatch, and Jay Berkenbilt - Superliminal Software
6 
7 LICENSE: Free to use and modify for non-commercial purposes as long as the
8     following conditions are adhered to:
9     1) Obvious credit for the source of this code and the designs it embodies
10        are clearly made, and
11     2) Ports and derived versions of 4D Magic Cube programs are not distributed
12        without the express written permission of the authors.
13 
14 DESCRIPTION:
15     This class provides an interface for getting user preferences.  It
16     has the special case "length" which refers to the number of pieces
17     per edge in the puzzle.  With the exception of the "length"
18     special case, this class is loosly based on the Java Properties
19     class.
20 */
21 
22 #ifndef PREFERENCES_H
23 #define PREFERENCES_H
24 
25 #include "MagicCube.h"
26 
27 class Preferences
28 {
29 public:
30     Preferences();
31 
32     bool getBoolProperty(char* name, bool def = false);
33     char* getStringProperty(char* name, char* def = 0);
34     int getIntProperty(char* name, int def);
35     real getRealProperty(char* name, real def);
36 
37     void setLength(int);
38     int getLength();
39 
40 private:
41     int length;
42 };
43 
44 #endif
45 
46 // Local Variables:
47 // c-basic-offset: 4
48 // c-comment-only-line-offset: 0
49 // c-file-offsets: ((defun-block-intro . +) (block-open . 0) (substatement-open . 0) (statement-cont . +) (statement-case-open . +4) (arglist-intro . +) (arglist-close . +) (inline-open . 0))
50 // indent-tabs-mode: nil
51 // End:
52