#include <vtkQtChartIndexRangeList.h>
A modified red-black binary tree is used to store the ranges. The red/black flag on each node is used to keep the tree balanced. Each parent node holds the combined range of the two children. The leaf nodes contain the list of actual ranges. The navigation and search methods provide an interface to the leaf nodes.
Definition at line 157 of file vtkQtChartIndexRangeList.h.
Public Member Functions | |
vtkQtChartIndexRangeList () | |
vtkQtChartIndexRangeList (int first, int second) | |
Creates an index range list instance with one range. | |
vtkQtChartIndexRangeList (const vtkQtChartIndexRangeList &other) | |
~vtkQtChartIndexRangeList () | |
vtkQtChartIndexRangeList & | operator= (const vtkQtChartIndexRangeList &other) |
Navigation Methods | |
bool | isEmpty () const |
Gets whether or not the list is empty. | |
vtkQtChartIndexRange * | getFirst () const |
Gets the first index range in the list. | |
vtkQtChartIndexRange * | getLast () const |
Gets the last index range in the list. | |
vtkQtChartIndexRange * | getNext (vtkQtChartIndexRange *range) const |
Gets the next index range in the list. | |
vtkQtChartIndexRange * | getPrevious (vtkQtChartIndexRange *range) const |
Gets the previous index range in the list. | |
Search Methods | |
vtkQtChartIndexRange * | findClosest (int value) const |
Finds the closest index range to the given value. | |
bool | contains (int value) const |
Gets whether or not the given value is contained in the list. | |
Modification Methods | |
bool | clear () |
Clears the list of index ranges. | |
bool | setRange (int first, int second) |
Sets the list to one index range. | |
bool | setRanges (const vtkQtChartIndexRangeList &ranges) |
Copies the given list of index ranges. | |
bool | addRange (int first, int second) |
Adds the given index range to the list. | |
bool | addRanges (const vtkQtChartIndexRangeList &ranges) |
Adds the list of index ranges to the list. | |
bool | subtractRange (int first, int second) |
Subtracts the given index range from the list. | |
bool | subtractRanges (const vtkQtChartIndexRangeList &ranges) |
Subtracts the list of index ranges to the list. | |
bool | xorRange (int first, int second) |
Sets the unique index ranges from the current list and the given range. | |
bool | xorRanges (const vtkQtChartIndexRangeList &ranges) |
Sets the unique index ranges from the current list and the given list. | |
void | limitRange (int minimum, int maximum) |
Limits the list of index ranges to the given bounds. | |
bool | offsetRanges (int start, int offset) |
Offsets the indexes in the list. |
vtkQtChartIndexRangeList::vtkQtChartIndexRangeList | ( | ) |
vtkQtChartIndexRangeList::vtkQtChartIndexRangeList | ( | int | first, | |
int | second | |||
) |
Creates an index range list instance with one range.
first | The first index in the range. | |
second | The last index in the range. |
vtkQtChartIndexRangeList::vtkQtChartIndexRangeList | ( | const vtkQtChartIndexRangeList & | other | ) |
vtkQtChartIndexRangeList::~vtkQtChartIndexRangeList | ( | ) |
vtkQtChartIndexRangeList& vtkQtChartIndexRangeList::operator= | ( | const vtkQtChartIndexRangeList & | other | ) |
bool vtkQtChartIndexRangeList::isEmpty | ( | ) | const [inline] |
Gets whether or not the list is empty.
Definition at line 178 of file vtkQtChartIndexRangeList.h.
vtkQtChartIndexRange* vtkQtChartIndexRangeList::getFirst | ( | ) | const |
Gets the first index range in the list.
vtkQtChartIndexRange* vtkQtChartIndexRangeList::getLast | ( | ) | const |
Gets the last index range in the list.
vtkQtChartIndexRange* vtkQtChartIndexRangeList::getNext | ( | vtkQtChartIndexRange * | range | ) | const |
Gets the next index range in the list.
range | The index range to search from. |
vtkQtChartIndexRange* vtkQtChartIndexRangeList::getPrevious | ( | vtkQtChartIndexRange * | range | ) | const |
Gets the previous index range in the list.
range | The index range to search from. |
vtkQtChartIndexRange* vtkQtChartIndexRangeList::findClosest | ( | int | value | ) | const |
Finds the closest index range to the given value.
value | The value to search for. |
bool vtkQtChartIndexRangeList::contains | ( | int | value | ) | const |
Gets whether or not the given value is contained in the list.
bool vtkQtChartIndexRangeList::clear | ( | ) |
Clears the list of index ranges.
bool vtkQtChartIndexRangeList::setRange | ( | int | first, | |
int | second | |||
) |
Sets the list to one index range.
first | The first index in the range. | |
second | The last index in the range. |
bool vtkQtChartIndexRangeList::setRanges | ( | const vtkQtChartIndexRangeList & | ranges | ) |
Copies the given list of index ranges.
ranges | The list of index ranges to copy. |
bool vtkQtChartIndexRangeList::addRange | ( | int | first, | |
int | second | |||
) |
Adds the given index range to the list.
first | The first index in the range. | |
second | The last index in the range. |
bool vtkQtChartIndexRangeList::addRanges | ( | const vtkQtChartIndexRangeList & | ranges | ) |
Adds the list of index ranges to the list.
ranges | The list of index ranges to add. |
bool vtkQtChartIndexRangeList::subtractRange | ( | int | first, | |
int | second | |||
) |
Subtracts the given index range from the list.
first | The first index in the range. | |
second | The last index in the range. |
bool vtkQtChartIndexRangeList::subtractRanges | ( | const vtkQtChartIndexRangeList & | ranges | ) |
Subtracts the list of index ranges to the list.
ranges | The list of index ranges to subtract. |
bool vtkQtChartIndexRangeList::xorRange | ( | int | first, | |
int | second | |||
) |
Sets the unique index ranges from the current list and the given range.
first | The first index in the range. | |
second | The last index in the range. |
bool vtkQtChartIndexRangeList::xorRanges | ( | const vtkQtChartIndexRangeList & | ranges | ) |
Sets the unique index ranges from the current list and the given list.
ranges | The list of index ranges. |
void vtkQtChartIndexRangeList::limitRange | ( | int | minimum, | |
int | maximum | |||
) |
Limits the list of index ranges to the given bounds.
minimum | The minimum boundary of indexes. | |
maximum | The maximum boundary of indexes. |
bool vtkQtChartIndexRangeList::offsetRanges | ( | int | start, | |
int | offset | |||
) |
Offsets the indexes in the list.
The indexes are only modified if they are greater than or equal to the given start index.
start | The index to start changes. | |
offset | The amount added to each index. Use a negative value to subtract from each index. |