UDAs - User Defined Attributes

- Added support for named allowable values.
This commit is contained in:
Paul Beckingham 2012-07-02 22:22:19 -04:00
parent 0d3f6f990d
commit 7f1d8c3682
5 changed files with 34 additions and 2 deletions

View file

@ -181,7 +181,7 @@ void Column::uda (std::map <std::string, Column*>& all)
////////////////////////////////////////////////////////////////////////////////
Column* Column::uda (const std::string& name)
{
Column* c = new ColumnUDA ();
ColumnUDA* c = new ColumnUDA ();
c->_name = name;
std::string key = "uda." + name + ".type";
@ -195,6 +195,11 @@ Column* Column::uda (const std::string& name)
key = "uda." + name + ".label";
if (context.config.get (key) != "")
c->_label = context.config.get (key);
key = "uda." + name + ".values";
if (context.config.get (key) != "")
split (c->_values, context.config.get (key), ',');
return c;
}