vtkQtChartIndexRangeList Class Reference

#include <vtkQtChartIndexRangeList.h>

Collaboration diagram for vtkQtChartIndexRangeList:

Collaboration graph
[legend]

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.


Public Member Functions

 vtkQtChartIndexRangeList ()
 vtkQtChartIndexRangeList (int first, int second)
 Creates an index range list instance with one range.
 vtkQtChartIndexRangeList (const vtkQtChartIndexRangeList &other)
 ~vtkQtChartIndexRangeList ()
vtkQtChartIndexRangeListoperator= (const vtkQtChartIndexRangeList &other)
Navigation Methods
bool isEmpty () const
 Gets whether or not the list is empty.
vtkQtChartIndexRangegetFirst () const
 Gets the first index range in the list.
vtkQtChartIndexRangegetLast () const
 Gets the last index range in the list.
vtkQtChartIndexRangegetNext (vtkQtChartIndexRange *range) const
 Gets the next index range in the list.
vtkQtChartIndexRangegetPrevious (vtkQtChartIndexRange *range) const
 Gets the previous index range in the list.
Search Methods
vtkQtChartIndexRangefindClosest (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.

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 ( const vtkQtChartIndexRangeList other  ) 

vtkQtChartIndexRangeList::~vtkQtChartIndexRangeList (  ) 


Member Function Documentation

vtkQtChartIndexRangeList& vtkQtChartIndexRangeList::operator= ( const vtkQtChartIndexRangeList other  ) 

bool vtkQtChartIndexRangeList::isEmpty (  )  const [inline]

Gets whether or not the list is empty.

Returns:
True if the list is empty.

Definition at line 178 of file vtkQtChartIndexRangeList.h.

vtkQtChartIndexRange* vtkQtChartIndexRangeList::getFirst (  )  const

Gets the first index range in the list.

Returns:
A pointer to the first index range or null if the list is empty.

vtkQtChartIndexRange* vtkQtChartIndexRangeList::getLast (  )  const

Gets the last index range in the list.

Returns:
A pointer to the last index range or null if the list is empty.

vtkQtChartIndexRange* vtkQtChartIndexRangeList::getNext ( vtkQtChartIndexRange range  )  const

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.

vtkQtChartIndexRange* vtkQtChartIndexRangeList::getPrevious ( vtkQtChartIndexRange range  )  const

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.

vtkQtChartIndexRange* vtkQtChartIndexRangeList::findClosest ( int  value  )  const

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.

bool vtkQtChartIndexRangeList::setRanges ( const vtkQtChartIndexRangeList ranges  ) 

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.

bool vtkQtChartIndexRangeList::addRanges ( const vtkQtChartIndexRangeList ranges  ) 

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.

bool vtkQtChartIndexRangeList::subtractRanges ( const vtkQtChartIndexRangeList ranges  ) 

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.

bool vtkQtChartIndexRangeList::xorRanges ( const vtkQtChartIndexRangeList ranges  ) 

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:

Generated on Mon Sep 27 18:44:14 2010 for VTK by  doxygen 1.5.6