1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
6 #include "icinga/i2-icinga.hpp"
7 #include "icinga/timeperiod-ti.hpp"
17 class TimePeriod final : public ObjectImpl<TimePeriod>
20 DECLARE_OBJECT(TimePeriod);
21 DECLARE_OBJECTNAME(TimePeriod);
23 void Start(bool runtimeCreated) override;
25 void UpdateRegion(double begin, double end, bool clearExisting);
27 bool GetIsInside() const override;
29 bool IsInside(double ts) const;
30 double FindNextTransition(double begin);
32 void ValidateRanges(const Lazy<Dictionary::Ptr>& lvalue, const ValidationUtils& utils) override;
35 void AddSegment(double s, double end);
36 void AddSegment(const Dictionary::Ptr& segment);
37 void RemoveSegment(double begin, double end);
38 void RemoveSegment(const Dictionary::Ptr& segment);
39 void PurgeSegments(double end);
41 void Merge(const TimePeriod::Ptr& timeperiod, bool include = true);
45 static void UpdateTimerHandler();
50 #endif /* TIMEPERIOD_H */