1 #ifndef _JPEG2000_RANGE_H_ 2 #define _JPEG2000_RANGE_H_ 43 assert((first >= 0) && (first <= last));
75 return ((first >= 0) && (first <= last));
96 return (item - first);
104 return (last - first + 1);
119 if(range.
IsValid()) out <<
"[" << range.
first <<
" - " << range.
last <<
"]";
friend bool operator!=(const Range &a, const Range &b)
Definition: range.h:112
int GetItem(int i) const
Returns an item of the range, starting at the first value.
Definition: range.h:84
friend bool operator==(const Range &a, const Range &b)
Definition: range.h:107
int first
First value of the range.
Definition: range.h:23
int GetIndex(int item) const
Returns the index of an item of the range.
Definition: range.h:94
int Length() const
Returns the length of the range (last - first + 1).
Definition: range.h:102
virtual ~Range()
Definition: range.h:125
Range()
Initializes the object.
Definition: range.h:30
bool IsValid() const
Returns true if the first value if greater or equal to zero, and it is less or equal to the last valu...
Definition: range.h:73
Represents a range of integer values, defined by two values, first and last, which are assumed to be ...
Definition: range.h:20
Set of classes for handling (reading and indexing) image files with the format defined in the Part 1 ...
Definition: codestream_index.h:10
Range(int first, int last)
Initializes the object.
Definition: range.h:41
Range & operator=(const Range &range)
Copy assignment.
Definition: range.h:60
int last
Last value of the range.
Definition: range.h:24
Range(const Range &range)
Copy constructor.
Definition: range.h:52
ostream & operator<<(ostream &out, const Request &request)
Definition: request.cc:65