CEBL  2.1
Preferences.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
18 
25 //handle defines
26 #ifndef DATAROOTDIR
27 #define DATAROOTDIR "/usr/local/cebl"
28 #endif
29 #ifndef PACKAGE
30 #define PACKAGE "cebl"
31 #endif
32 #ifndef PACKAGE_STRING
33 #define PACKAGE_STRING "cebl-0.0"
34 #endif
35 
36 #ifndef PREFERENCES_H
37 #define PREFERENCES_H
38 
39 #include <boost/program_options.hpp>
40 namespace po = boost::program_options;
41 
43 {
44 private:
45  //description of options
46  po::options_description desc;
47 
48  std::string conf_dir;
49  //set options
50  std::map<string, string> set_options;
51  std::vector<string> option_list;
52 
53  bool have_conf_dir;
54 
55  //load this session file on load
56  string session_filename;
57 
58  //channels
59  string default_channels_filename;
60  string string_table_filename;
61 
62  //preferences
63  std::vector<std::string> paths;
64 public:
65 
66  Preferences();
67  ~Preferences();
68 
69  bool initCEBL();
70  bool processCL(int ac, char ** av);
71  std::vector<std::string> getPaths() const { return paths; }
73  string getSessionFilename() { return session_filename; }
74  string getStringTableFilename() { return string_table_filename;}
75 
76  //options
77  void addOption(string name, string description, char short_name = '\0');
78  string getOption(string name);
79 };
80 
81 #endif