/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Span.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: bchanot +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/01/13 18:18:53 by bchanot #+# #+# */ /* Updated: 2026/01/14 16:18:13 by bchanot ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef SPAN_HPP # define SPAN_HPP # include # include #include #include class Span { public: Span( unsigned int const & src ); Span( Span const & src ); ~Span(); Span & operator=( Span const & rhs ); class isFullException : public std::exception { public : virtual const char * what() const throw() { return ("The Span container is full"); } }; void addNumber(int const & add); unsigned int shortestSpan(void) const; unsigned int longestSpan(void) const; void fullFillSpan(void); void rangeFillSpan(size_t start, size_t end); void fillSpan(size_t n); unsigned int getSize(void) const; private: std::vector _values; unsigned int _max; Span(); }; std::ostream & operator<<( std::ostream & o, Span const & i ); #endif /* ************************************************************ SPAN_H */