mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Timeline: Now uses an Interval internally
This commit is contained in:
parent
d01994cf0f
commit
a9874159fd
2 changed files with 5 additions and 6 deletions
|
@ -42,21 +42,21 @@
|
||||||
//
|
//
|
||||||
// Derived:
|
// Derived:
|
||||||
//
|
//
|
||||||
// |----------| |----------| Tracked
|
// |-----------| |----------------| Tracked
|
||||||
// |-------| |-----| Untracked
|
// |-------| |-----| Gaps
|
||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Timeline::start (const Datetime& when)
|
void Timeline::start (const Datetime& when)
|
||||||
{
|
{
|
||||||
_start = when;
|
_range.start (when);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Timeline::end (const Datetime& when)
|
void Timeline::end (const Datetime& when)
|
||||||
{
|
{
|
||||||
_end = when;
|
_range.end (when);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -45,8 +45,7 @@ public:
|
||||||
std::vector <Interval> untracked () const;
|
std::vector <Interval> untracked () const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Datetime _start {0};
|
Interval _range {};
|
||||||
Datetime _end {0};
|
|
||||||
std::vector <Interval> _inclusions {};
|
std::vector <Interval> _inclusions {};
|
||||||
std::vector <Exclusion> _exclusions {};
|
std::vector <Exclusion> _exclusions {};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue