mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Filter: Added ::dump for debugging
This commit is contained in:
parent
7c4f64f247
commit
9e608b7e25
2 changed files with 21 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include <cmake.h>
|
#include <cmake.h>
|
||||||
#include <Filter.h>
|
#include <Filter.h>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool Filter::empty () const
|
bool Filter::empty () const
|
||||||
|
@ -73,3 +74,21 @@ void Filter::tag (const std::string& tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
std::string Filter::dump () const
|
||||||
|
{
|
||||||
|
std::stringstream out;
|
||||||
|
|
||||||
|
out << "Filter _start '"
|
||||||
|
<< _start.toEpoch ()
|
||||||
|
<< "' _end '"
|
||||||
|
<< _end.toEpoch ()
|
||||||
|
<< "' _tags";
|
||||||
|
|
||||||
|
for (auto& tag : _tags)
|
||||||
|
out << " '" << tag << "'";
|
||||||
|
|
||||||
|
out << "\n";
|
||||||
|
return out.str ();
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -46,6 +46,8 @@ public:
|
||||||
std::set <std::string> tags () const;
|
std::set <std::string> tags () const;
|
||||||
void tag (const std::string&);
|
void tag (const std::string&);
|
||||||
|
|
||||||
|
std::string dump () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Datetime _start {0};
|
Datetime _start {0};
|
||||||
Datetime _end {0};
|
Datetime _end {0};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue