Lexer: Upgraded attributes vector to a map of name to type

This commit is contained in:
Paul Beckingham 2015-07-26 12:22:02 -04:00
parent 52d2bbd11a
commit d0c4326af3
3 changed files with 5 additions and 0 deletions

View file

@ -641,7 +641,10 @@ void Context::staticInitialization ()
}
for (auto& col : columns)
{
Task::attributes[col.first] = col.second->type ();
Lexer::attributes[col.first] = col.second->type ();
}
Task::urgencyProjectCoefficient = config.getReal ("urgency.project.coefficient");
Task::urgencyActiveCoefficient = config.getReal ("urgency.active.coefficient");

View file

@ -34,6 +34,7 @@
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
static const unsigned int uuid_min_length = 8;
std::map <std::string, std::string> Lexer::attributes;
std::string Lexer::dateFormat = "";
bool Lexer::isoEnabled = true;

View file

@ -41,6 +41,7 @@ public:
// These are overridable.
static std::string dateFormat;
static bool isoEnabled;
static std::map <std::string, std::string> attributes;
enum class Type { uuid, number, hex,
string,