mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Timeline: Stubbed ::tracked and ::untracked
This commit is contained in:
parent
0592a42c63
commit
ad309b51e2
3 changed files with 32 additions and 6 deletions
|
@ -1,8 +1,6 @@
|
|||
|
||||
1.0.0 () -
|
||||
|
||||
0.1.0 () -
|
||||
|
||||
- TD-49 Log when file management fails
|
||||
(thanks to Ben Boeckel).
|
||||
- TD-115 Throw error when config file is missing or not readable
|
||||
|
|
|
@ -62,11 +62,35 @@ void Timeline::end (const Datetime& when)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Timeline::include (const Interval& interval)
|
||||
{
|
||||
_inclusions.push_back (interval);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Timeline::exclude (const Exclusion& exclusion)
|
||||
{
|
||||
_exclusions.push_back (exclusion);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::vector <Interval> Timeline::tracked () const
|
||||
{
|
||||
std::vector <Interval> combined;
|
||||
|
||||
// TODO Combine _inclusions and _exclusions to yield a set of collapsed
|
||||
// intervals.
|
||||
|
||||
return combined;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::vector <Interval> Timeline::untracked () const
|
||||
{
|
||||
std::vector <Interval> combined;
|
||||
|
||||
// TODO Combine _inclusions and _exclusions to yield a set of collapsed
|
||||
// unracked intervals.
|
||||
|
||||
return combined;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <Datetime.h>
|
||||
#include <Interval.h>
|
||||
#include <Exclusion.h>
|
||||
#include <vector>
|
||||
|
||||
class Timeline
|
||||
{
|
||||
|
@ -40,11 +41,14 @@ public:
|
|||
void include (const Interval&);
|
||||
void exclude (const Exclusion&);
|
||||
|
||||
std::vector <Interval> tracked () const;
|
||||
std::vector <Interval> untracked () const;
|
||||
|
||||
private:
|
||||
// TODO List of inclusions.
|
||||
// TODO List of exclusions.
|
||||
Datetime _start {0};
|
||||
Datetime _end {0};
|
||||
Datetime _start {0};
|
||||
Datetime _end {0};
|
||||
std::vector <Interval> _inclusions {};
|
||||
std::vector <Exclusion> _exclusions {};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue