mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Command: Added DNA for commands
This commit is contained in:
parent
3478d1f03b
commit
752e737f18
2 changed files with 44 additions and 0 deletions
|
@ -218,6 +218,10 @@ Command::Command ()
|
||||||
, _read_only (true)
|
, _read_only (true)
|
||||||
, _displays_id (true)
|
, _displays_id (true)
|
||||||
, _needs_confirm (false)
|
, _needs_confirm (false)
|
||||||
|
, _needs_gc (true)
|
||||||
|
, _uses_context (true)
|
||||||
|
, _accepts_filter (true)
|
||||||
|
, _accepts_modifications (true)
|
||||||
, _permission_quit (false)
|
, _permission_quit (false)
|
||||||
, _permission_all (false)
|
, _permission_all (false)
|
||||||
, _first_iteration (true)
|
, _first_iteration (true)
|
||||||
|
@ -259,6 +263,36 @@ bool Command::displays_id () const
|
||||||
return _displays_id;
|
return _displays_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Command::needs_gc () const
|
||||||
|
{
|
||||||
|
return _needs_gc;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Command::uses_context () const
|
||||||
|
{
|
||||||
|
return _uses_context;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Command::accepts_filter () const
|
||||||
|
{
|
||||||
|
return _accepts_filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Command::accepts_modifications () const
|
||||||
|
{
|
||||||
|
return _accepts_modifications;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool Command::accepts_miscellaneous () const
|
||||||
|
{
|
||||||
|
return _accepts_miscellaneous;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Returns true or false indicating whether to proceed with a write command, on
|
// Returns true or false indicating whether to proceed with a write command, on
|
||||||
// a per-task basis, after (potentially) asking for permission.
|
// a per-task basis, after (potentially) asking for permission.
|
||||||
|
|
|
@ -45,6 +45,11 @@ public:
|
||||||
std::string description () const;
|
std::string description () const;
|
||||||
bool read_only () const;
|
bool read_only () const;
|
||||||
bool displays_id () const;
|
bool displays_id () const;
|
||||||
|
bool needs_gc () const;
|
||||||
|
bool uses_context () const;
|
||||||
|
bool accepts_filter () const;
|
||||||
|
bool accepts_modifications () const;
|
||||||
|
bool accepts_miscellaneous () const;
|
||||||
virtual int execute (std::string&) = 0;
|
virtual int execute (std::string&) = 0;
|
||||||
|
|
||||||
enum class Category
|
enum class Category
|
||||||
|
@ -76,6 +81,11 @@ protected:
|
||||||
bool _read_only;
|
bool _read_only;
|
||||||
bool _displays_id;
|
bool _displays_id;
|
||||||
bool _needs_confirm;
|
bool _needs_confirm;
|
||||||
|
bool _needs_gc;
|
||||||
|
bool _uses_context;
|
||||||
|
bool _accepts_filter;
|
||||||
|
bool _accepts_modifications;
|
||||||
|
bool _accepts_miscellaneous;
|
||||||
|
|
||||||
// Permission support
|
// Permission support
|
||||||
bool _permission_quit;
|
bool _permission_quit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue