Lexer: Upgraded attributes vector to a map of name to type
This commit is contained in:
@@ -641,7 +641,10 @@ void Context::staticInitialization ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto& col : columns)
|
for (auto& col : columns)
|
||||||
|
{
|
||||||
Task::attributes[col.first] = col.second->type ();
|
Task::attributes[col.first] = col.second->type ();
|
||||||
|
Lexer::attributes[col.first] = col.second->type ();
|
||||||
|
}
|
||||||
|
|
||||||
Task::urgencyProjectCoefficient = config.getReal ("urgency.project.coefficient");
|
Task::urgencyProjectCoefficient = config.getReal ("urgency.project.coefficient");
|
||||||
Task::urgencyActiveCoefficient = config.getReal ("urgency.active.coefficient");
|
Task::urgencyActiveCoefficient = config.getReal ("urgency.active.coefficient");
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
||||||
static const unsigned int uuid_min_length = 8;
|
static const unsigned int uuid_min_length = 8;
|
||||||
|
std::map <std::string, std::string> Lexer::attributes;
|
||||||
|
|
||||||
std::string Lexer::dateFormat = "";
|
std::string Lexer::dateFormat = "";
|
||||||
bool Lexer::isoEnabled = true;
|
bool Lexer::isoEnabled = true;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public:
|
|||||||
// These are overridable.
|
// These are overridable.
|
||||||
static std::string dateFormat;
|
static std::string dateFormat;
|
||||||
static bool isoEnabled;
|
static bool isoEnabled;
|
||||||
|
static std::map <std::string, std::string> attributes;
|
||||||
|
|
||||||
enum class Type { uuid, number, hex,
|
enum class Type { uuid, number, hex,
|
||||||
string,
|
string,
|
||||||
|
|||||||
Reference in New Issue
Block a user