mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Expression support
- Added Context::getColumns to return a vector of column names. This is to help a shift toward using the Column objects to assist in the parsing/validation of data entry/modifications. - Added Column::modifiable to delegate an attributes readable/writeable state. This means the columns will be in charge of their own mutability, which will simplify and generalize Command::modify_task.
This commit is contained in:
parent
ee9199b4e0
commit
1164ea5cf1
6 changed files with 49 additions and 27 deletions
|
@ -132,17 +132,19 @@ Column::Column ()
|
|||
, _style ("default")
|
||||
, _label ("")
|
||||
, _report ("")
|
||||
, _modifiable (true)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Column::Column (const Column& other)
|
||||
{
|
||||
_name = other._name;
|
||||
_type = other._type;
|
||||
_style = other._style;
|
||||
_label = other._label;
|
||||
_label = other._report;
|
||||
_name = other._name;
|
||||
_type = other._type;
|
||||
_style = other._style;
|
||||
_label = other._label;
|
||||
_label = other._report;
|
||||
_modifiable = other._modifiable;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -150,11 +152,12 @@ Column& Column::operator= (const Column& other)
|
|||
{
|
||||
if (this != &other)
|
||||
{
|
||||
_name = other._name;
|
||||
_type = other._type;
|
||||
_style = other._style;
|
||||
_label = other._label;
|
||||
_report = other._report;
|
||||
_name = other._name;
|
||||
_type = other._type;
|
||||
_style = other._style;
|
||||
_label = other._label;
|
||||
_report = other._report;
|
||||
_modifiable = other._modifiable;
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
@ -163,10 +166,12 @@ Column& Column::operator= (const Column& other)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Column::operator== (const Column& other) const
|
||||
{
|
||||
return _name == other._name &&
|
||||
_type == other._type &&
|
||||
_style == other._style &&
|
||||
_label == other._label;
|
||||
return _name == other._name &&
|
||||
_type == other._type &&
|
||||
_style == other._style &&
|
||||
_label == other._label &&
|
||||
_report == other._report &&
|
||||
_modifiable == other._modifiable;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue