mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Implemented A2::attribute for reading arg atts
This commit is contained in:
parent
e159c838ad
commit
a433ca308a
2 changed files with 10 additions and 3 deletions
|
@ -162,6 +162,7 @@ void A2::attribute (const std::string& name, const double value)
|
|||
{
|
||||
_attributes[name] = format (value, 1, 8);
|
||||
}
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessor for attributes.
|
||||
|
@ -175,6 +176,7 @@ const std::string A2::attribute (const std::string& name) const
|
|||
return "";
|
||||
}
|
||||
|
||||
/*
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void A2::removeAttribute (const std::string& name)
|
||||
{
|
||||
|
@ -740,9 +742,12 @@ const std::string CLI2::dump (const std::string& title) const
|
|||
}
|
||||
out << "\n";
|
||||
|
||||
if (_args.size ())
|
||||
{
|
||||
out << " _args\n";
|
||||
for (auto& a : _args)
|
||||
out << " " << a.dump () << "\n";
|
||||
}
|
||||
|
||||
return out.str ();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,9 @@ public:
|
|||
/*
|
||||
void attribute (const std::string&, const int);
|
||||
void attribute (const std::string&, const double);
|
||||
*/
|
||||
const std::string attribute (const std::string&) const;
|
||||
/*
|
||||
void removeAttribute (const std::string&);
|
||||
*/
|
||||
const std::string dump () const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue