mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Interval: Implemented ::dump
This commit is contained in:
parent
547370b707
commit
5b523f96c2
2 changed files with 15 additions and 0 deletions
|
@ -33,6 +33,16 @@ std::string Interval::dump () const
|
||||||
{
|
{
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
|
|
||||||
|
out << "Interval _from '"
|
||||||
|
<< _from.toEpoch ()
|
||||||
|
<< "' _to '"
|
||||||
|
<< _to.toEpoch ()
|
||||||
|
<< "' _tags";
|
||||||
|
|
||||||
|
for (const auto& tag : _tags)
|
||||||
|
out << " '" << tag << "'";
|
||||||
|
|
||||||
|
out << "\n";
|
||||||
return out.str ();
|
return out.str ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#ifndef INCLUDED_INTERVAL
|
#ifndef INCLUDED_INTERVAL
|
||||||
#define INCLUDED_INTERVAL
|
#define INCLUDED_INTERVAL
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <Datetime.h>
|
||||||
|
|
||||||
class Interval
|
class Interval
|
||||||
{
|
{
|
||||||
|
@ -36,6 +38,9 @@ public:
|
||||||
std::string dump () const;
|
std::string dump () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Datetime _from {0};
|
||||||
|
Datetime _to {0};
|
||||||
|
std::vector <std::string> _tags {};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue