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:
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
|
||||
|
||||
Reference in New Issue
Block a user