Interval: Implemented ::dump

This commit is contained in:
Paul Beckingham 2016-03-02 09:18:19 -05:00
parent 547370b707
commit 5b523f96c2
2 changed files with 15 additions and 0 deletions

View file

@ -33,6 +33,16 @@ std::string Interval::dump () const
{
std::stringstream out;
out << "Interval _from '"
<< _from.toEpoch ()
<< "' _to '"
<< _to.toEpoch ()
<< "' _tags";
for (const auto& tag : _tags)
out << " '" << tag << "'";
out << "\n";
return out.str ();
}

View file

@ -27,7 +27,9 @@
#ifndef INCLUDED_INTERVAL
#define INCLUDED_INTERVAL
#include <vector>
#include <string>
#include <Datetime.h>
class Interval
{
@ -36,6 +38,9 @@ public:
std::string dump () const;
private:
Datetime _from {0};
Datetime _to {0};
std::vector <std::string> _tags {};
};
#endif