diff --git a/sbg/dto/interval_dto.cpp b/sbg/dto/interval_dto.cpp index 4532553..84baf31 100644 --- a/sbg/dto/interval_dto.cpp +++ b/sbg/dto/interval_dto.cpp @@ -30,6 +30,9 @@ IntervalDTO::IntervalDTO(const NAT &begin, const NAT &step, const NAT &end) { } +// Set functions --------------------------------------------------------------- +bool IntervalDTO::isEmpty() const { return end_ < begin_; } + // Operators ------------------------------------------------------------------- std::ostream &operator<<(std::ostream &out, const IntervalDTO &i) { diff --git a/sbg/dto/interval_dto.hpp b/sbg/dto/interval_dto.hpp index aebbb94..0d70ada 100644 --- a/sbg/dto/interval_dto.hpp +++ b/sbg/dto/interval_dto.hpp @@ -44,6 +44,11 @@ struct IntervalDTO { IntervalDTO(const NAT &x); IntervalDTO(const NAT &begin, const NAT &step, const NAT &end); + /** + * @brief Traditional set operations. + */ + bool isEmpty() const; + private: NAT begin_; NAT step_;