mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 18:27:20 +02:00
Decoupling
- Eliminated some calls to context.config from Task‥cpp, reducing the coupling. If context can be eliminated from Task.cpp, via statically initialized variables, then Taskwarrior and the task server can share Task.{ḩ,cpp} which would be an enormous saving in effort. (cherry picked from commit 215b03b1a7f47299a0d3e64331c7e3c962b4caf0)
This commit is contained in:
parent
a3f158d399
commit
c16a735040
4 changed files with 127 additions and 117 deletions
25
src/Task.h
25
src/Task.h
|
@ -34,12 +34,29 @@
|
|||
#include <string>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef PRODUCT_TASKWARRIOR
|
||||
void initializeUrgencyCoefficients ();
|
||||
#endif
|
||||
|
||||
class Task : public std::map <std::string, std::string>
|
||||
{
|
||||
public:
|
||||
static std::string defaultProject;
|
||||
static std::string defaultPriority;
|
||||
static std::string defaultDue;
|
||||
static bool searchCaseSensitive;
|
||||
static bool regex;
|
||||
static std::map <std::string, std::string> attributes; // name -> type
|
||||
static std::map <std::string, float> coefficients;
|
||||
static float urgencyPriorityCoefficient;
|
||||
static float urgencyProjectCoefficient;
|
||||
static float urgencyActiveCoefficient;
|
||||
static float urgencyScheduledCoefficient;
|
||||
static float urgencyWaitingCoefficient;
|
||||
static float urgencyBlockedCoefficient;
|
||||
static float urgencyAnnotationsCoefficient;
|
||||
static float urgencyTagsCoefficient;
|
||||
static float urgencyNextCoefficient;
|
||||
static float urgencyDueCoefficient;
|
||||
static float urgencyBlockingCoefficient;
|
||||
static float urgencyAgeCoefficient;
|
||||
|
||||
public:
|
||||
Task (); // Default constructor
|
||||
Task (const Task&); // Copy constructor
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue