mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 12:17:20 +02:00
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:
parent
0002376f2a
commit
0faf7fa8ee
12 changed files with 298 additions and 396 deletions
17
src/Config.h
17
src/Config.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue