Columns
- Removed ColUDA::is_uda override, because it was wrong. Now in the base class a member variable is referenced.
This commit is contained in:
@@ -552,8 +552,13 @@ void A3t::findAttribute ()
|
|||||||
(*i)->attribute ("name", canonical);
|
(*i)->attribute ("name", canonical);
|
||||||
(*i)->attribute ("value", value);
|
(*i)->attribute ("value", value);
|
||||||
|
|
||||||
if (context.columns[canonical]->modifiable ())
|
std::map <std::string, Column*>::const_iterator col;
|
||||||
|
col = context.columns.find (canonical);
|
||||||
|
if (col != context.columns.end () &&
|
||||||
|
col->second->modifiable ())
|
||||||
|
{
|
||||||
(*i)->tag ("MODIFIABLE");
|
(*i)->tag ("MODIFIABLE");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (canonicalize (canonical, "uda", name))
|
else if (canonicalize (canonical, "uda", name))
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ ColumnUDA::ColumnUDA ()
|
|||||||
_type = "string";
|
_type = "string";
|
||||||
_style = "default";
|
_style = "default";
|
||||||
_label = "";
|
_label = "";
|
||||||
|
_uda = true;
|
||||||
|
|
||||||
_hyphenate = (_type == "string") ? true : false;
|
_hyphenate = (_type == "string") ? true : false;
|
||||||
|
|
||||||
@@ -56,12 +57,6 @@ ColumnUDA::~ColumnUDA ()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
bool ColumnUDA::is_uda () const
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool ColumnUDA::validate (std::string& value)
|
bool ColumnUDA::validate (std::string& value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ public:
|
|||||||
ColumnUDA ();
|
ColumnUDA ();
|
||||||
~ColumnUDA ();
|
~ColumnUDA ();
|
||||||
|
|
||||||
bool is_uda () const;
|
|
||||||
bool validate (std::string&);
|
bool validate (std::string&);
|
||||||
void measure (Task&, unsigned int&, unsigned int&);
|
void measure (Task&, unsigned int&, unsigned int&);
|
||||||
void render (std::vector <std::string>&, Task&, int, Color&);
|
void render (std::vector <std::string>&, Task&, int, Color&);
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ Column::Column ()
|
|||||||
, _label ("")
|
, _label ("")
|
||||||
, _report ("")
|
, _report ("")
|
||||||
, _modifiable (true)
|
, _modifiable (true)
|
||||||
|
, _uda (false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,6 +222,7 @@ Column::Column (const Column& other)
|
|||||||
_label = other._label;
|
_label = other._label;
|
||||||
_label = other._report;
|
_label = other._report;
|
||||||
_modifiable = other._modifiable;
|
_modifiable = other._modifiable;
|
||||||
|
_uda = other._uda;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -234,6 +236,7 @@ Column& Column::operator= (const Column& other)
|
|||||||
_label = other._label;
|
_label = other._label;
|
||||||
_report = other._report;
|
_report = other._report;
|
||||||
_modifiable = other._modifiable;
|
_modifiable = other._modifiable;
|
||||||
|
_uda = other._uda;
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
@@ -242,12 +245,13 @@ Column& Column::operator= (const Column& other)
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Column::operator== (const Column& other) const
|
bool Column::operator== (const Column& other) const
|
||||||
{
|
{
|
||||||
return _name == other._name &&
|
return _name == other._name &&
|
||||||
_type == other._type &&
|
_type == other._type &&
|
||||||
_style == other._style &&
|
_style == other._style &&
|
||||||
_label == other._label &&
|
_label == other._label &&
|
||||||
_report == other._report &&
|
_report == other._report &&
|
||||||
_modifiable == other._modifiable;
|
_modifiable == other._modifiable &&
|
||||||
|
_uda == other._uda;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
std::string label () const { return _label; }
|
std::string label () const { return _label; }
|
||||||
std::string type () const { return _type; }
|
std::string type () const { return _type; }
|
||||||
bool modifiable () const { return _modifiable; }
|
bool modifiable () const { return _modifiable; }
|
||||||
bool is_uda () const { return false; }
|
bool is_uda () const { return _uda; }
|
||||||
std::vector <std::string> styles () const { return _styles; }
|
std::vector <std::string> styles () const { return _styles; }
|
||||||
std::vector <std::string> examples () const { return _examples; }
|
std::vector <std::string> examples () const { return _examples; }
|
||||||
|
|
||||||
@@ -74,6 +74,7 @@ protected:
|
|||||||
std::string _label;
|
std::string _label;
|
||||||
std::string _report;
|
std::string _report;
|
||||||
bool _modifiable;
|
bool _modifiable;
|
||||||
|
bool _uda;
|
||||||
std::vector <std::string> _styles;
|
std::vector <std::string> _styles;
|
||||||
std::vector <std::string> _examples;
|
std::vector <std::string> _examples;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user