Timeline: Described procedure for generating ::tracked output

This commit is contained in:
Paul Beckingham 2016-04-18 23:19:05 -04:00
parent 716d32c8a8
commit 18524fa8c8

View file

@ -69,14 +69,36 @@ void Timeline::exclude (const Exclusion& exclusion)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
std::vector <Interval> Timeline::tracked (Rules& rules) const std::vector <Interval> Timeline::tracked (Rules& rules) const
{ {
// TODO Create a range representing the whole timeline.
// TODO Intersect this range with the outer range of all inclusions.
// TODO Obtain holidays.
// TODO for each exclusion:
// TODO if "exc day off <date>":
// TODO add <date> as a holiday.
// TODO if "exc day on <date>":
// TODO if <date> matches a holiday:
// TODO remove <date> as a holiday
// TODO for each inclusion:
// TODO for each holiday:
// TODO intersect intelligently.
// TODO for each exclusion:
// TODO generate a set of ranges to exclude.
// TODO for each excluded range:
// TODO intersect intelligently.
// TODO Return results, which should be the stored inclusions, clipped by
// subtracting all the exclusions nad holidays.
/* /*
std::vector <Interval> combined; std::vector <Interval> combined;
// TODO Combine _inclusions and _exclusions to yield a set of collapsed
// intervals.
return combined; return combined;
*/ */
return _inclusions; return _inclusions;
} }