Config - defaults

- Config is now providing a default set of all configuration variables.
- The default set is used to both initialize a Config object, and to
  create a sample .taskrc.
This commit is contained in:
Paul Beckingham 2010-01-15 02:50:46 -05:00
parent 0002376f2a
commit 0faf7fa8ee
12 changed files with 298 additions and 396 deletions

View file

@ -40,12 +40,21 @@ public:
Config (const Config&);
Config& operator= (const Config&);
bool load (const std::string&, int nest = 1);
void load (const std::string&, int nest = 1);
void parse (const std::string&, int nest = 1);
void createDefaultRC (const std::string&, const std::string&);
void createDefaultData (const std::string&);
void setDefaults ();
void clear ();
/*
const std::string get (const std::string&);
const std::string getInteger (const std::string&);
const std::string getReal (const std::string&);
const std::string getBoolean (const std::string&);
*/
// <OBSOLETE>
const std::string get (const char*);
const std::string get (const char*, const char*);
const std::string get (const std::string&);
@ -53,17 +62,17 @@ public:
bool get (const std::string&, const bool);
int get (const std::string&, const int);
double get (const std::string&, const double);
// </OBSOLETE>
void set (const std::string&, const int);
void set (const std::string&, const double);
void set (const std::string&, const std::string&);
void all (std::vector <std::string>&);
void getSequence (std::vector<std::string>&);
std::string checkForDuplicates ();
std::string checkForDeprecatedColor ();
private:
std::vector <std::string> sequence;
static std::string defaults;
};
#endif