The vtkQtChartIndexRangeList class stores a searchable list of index ranges.
More...
#include <vtkQtChartIndexRangeList.h>
List of all members.
Detailed Description
The vtkQtChartIndexRangeList class stores a searchable list of index ranges.
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.
Constructor & Destructor Documentation
vtkQtChartIndexRangeList::vtkQtChartIndexRangeList |
( |
| ) |
|
vtkQtChartIndexRangeList::vtkQtChartIndexRangeList |
( |
int |
first, |
|
|
int |
second |
|
) |
| |
Creates an index range list instance with one range.
- Parameters:
-
first | The first index in the range. |
second | The last index in the range. |
vtkQtChartIndexRangeList::~vtkQtChartIndexRangeList |
( |
| ) |
|
Member Function Documentation
bool vtkQtChartIndexRangeList::isEmpty |
( |
| ) |
const [inline] |
Gets the first index range in the list.
- Returns:
- A pointer to the first index range or null if the list is empty.
Gets the last index range in the list.
- Returns:
- A pointer to the last index range or null if the list is empty.
Gets the next index range in the list.
- Parameters:
-
range | The index range to search from. |
- Returns:
- A pointer to the next index range in the list or null if there are no more nodes in the list.
Gets the previous index range in the list.
- Parameters:
-
range | The index range to search from. |
- Returns:
- A pointer to the previous index range in the list or null if there are no more nodes in the list.
Finds the closest index range to the given value.
- Parameters:
-
value | The value to search for. |
- Returns:
- A pointer to the nearest index range or null if the list is empty.
bool vtkQtChartIndexRangeList::contains |
( |
int |
value | ) |
const |
Gets whether or not the given value is contained in the list.
- Returns:
- True if the given value is contained in the list.
bool vtkQtChartIndexRangeList::clear |
( |
| ) |
|
Clears the list of index ranges.
- Returns:
- True if the list was modified.
bool vtkQtChartIndexRangeList::setRange |
( |
int |
first, |
|
|
int |
second |
|
) |
| |
Sets the list to one index range.
- Parameters:
-
first | The first index in the range. |
second | The last index in the range. |
- Returns:
- True if the list was modified.
Copies the given list of index ranges.
- Parameters:
-
ranges | The list of index ranges to copy. |
- Returns:
- True if the list was modified.
bool vtkQtChartIndexRangeList::addRange |
( |
int |
first, |
|
|
int |
second |
|
) |
| |
Adds the given index range to the list.
- Parameters:
-
first | The first index in the range. |
second | The last index in the range. |
- Returns:
- True if the list was modified.
Adds the list of index ranges to the list.
- Parameters:
-
ranges | The list of index ranges to add. |
- Returns:
- True if the list was modified.
bool vtkQtChartIndexRangeList::subtractRange |
( |
int |
first, |
|
|
int |
second |
|
) |
| |
Subtracts the given index range from the list.
- Parameters:
-
first | The first index in the range. |
second | The last index in the range. |
- Returns:
- True if the list was modified.
Subtracts the list of index ranges to the list.
- Parameters:
-
ranges | The list of index ranges to subtract. |
- Returns:
- True if the list was modified.
bool vtkQtChartIndexRangeList::xorRange |
( |
int |
first, |
|
|
int |
second |
|
) |
| |
Sets the unique index ranges from the current list and the given range.
- Parameters:
-
first | The first index in the range. |
second | The last index in the range. |
- Returns:
- True if the list was modified.
Sets the unique index ranges from the current list and the given list.
- Parameters:
-
ranges | The list of index ranges. |
- Returns:
- True if the list was modified.
void vtkQtChartIndexRangeList::limitRange |
( |
int |
minimum, |
|
|
int |
maximum |
|
) |
| |
Limits the list of index ranges to the given bounds.
- Parameters:
-
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.
- Parameters:
-
start | The index to start changes. |
offset | The amount added to each index. Use a negative value to subtract from each index. |
- Returns:
- True if the list was modified.
The documentation for this class was generated from the following file: