#include <vuDVector.h>
Inheritance diagram for vuDVector< T >:
Public Member Functions | |
vuDVector () | |
Default constructor. | |
vuDVector (const vuDVector< T > &v) | |
Copy constructor that does a deep copy. | |
~vuDVector () | |
Destructor. | |
void | setStepSize (dword s) |
Sets the stepsize of the vector. | |
dword | getStepSize (void) const |
Returns the step size of the vector. | |
void | setSize (dword s) |
Sets the size of the vector. | |
dword | getSize (void) const |
Returns the size of the vector. | |
dword | getLength (void) const |
Returns the length of the vector. | |
bool | isMember (const T &elem) const |
Returns true if the element is stored in the vector. | |
dword | findIndex (const T &elem) const |
Returns the position of the element within the vector. | |
void | remove (dword index) |
Removes the indexed element from the vector. | |
void | removeAll () |
Removes all elements from the vector. | |
void | removeRange (dword start, dword end) |
Removes all the elements in the vector from start to end, inclusive. | |
void | sizeToLength (void) |
Resize the vector to be the same size as the number of data elements stored in it. | |
void | stepToLength (void) |
Resize the vector to be the multiple of the stepsize that is nearest to the length. | |
vuDVector< T > & | operator= (const vuDVector< T > &rhs) |
Assignment operator which does a deep copy. | |
T & | operator[] (dword index) |
Access operator allowing access and modification of elements. | |
const T & | operator[] (dword index) const |
Const Access operator allowing const access. | |
void | add (const T &elem) |
Adds the element to the end of the vector. | |
void | insert (dword index, const T &elem) |
Inserts an element at the given position in the vector. | |
Private Member Functions | |
void | createData (void) |
Helper function for the creation of the dynamic data in the list. | |
void | destroyData (void) |
Helper function for the destruction of the dynamic data in the list. | |
void | copyData (const vuDVector &v) |
Copies the elements from the vector v to the instance. | |
void | resizeData (dword size) |
Resizes the vector to the new size. | |
Private Attributes | |
dword | m_Size |
the current size of the vector (including preallocated but not necessarily used elements) | |
dword | m_Length |
the current length of the vector (last used element) | |
dword | m_StepSize |
the current stepsize that is being used to expand the vector when the vector is expanded (note, this will change without warning). | |
T * | m_Data |
the data buffer of the vector |
That is lightweight and doesn't conflict with wxWindows or the standard library.
Definition at line 12 of file vuDVector.h.
|
Default constructor.
Definition at line 17 of file vuDVector.h. |
|
Copy constructor that does a deep copy.
Definition at line 26 of file vuDVector.h. |
|
Destructor.
Definition at line 36 of file vuDVector.h. |
|
Adds the element to the end of the vector.
Definition at line 191 of file vuDVector.h. Referenced by vuTFDesignSpec::addLight(), vuConvexHull::addPoint(), vuTFDesign::clearAllNodes(), vuConvexHull::getCHull(), vuCamera::load(), vuCamera::load_cameras(), load_WithTime(), main(), vuConvexHull::mergeULHulls(), vuKeyFramerDialog::OnTakeShot(), vuKeyFramerDialog::OpenGIFile(), vuGuiParser::ParseButton(), vuGuiParser::ParseCheckBox(), vuGuiParser::ParseList(), vuGuiParser::ParseListBox(), vuGuiParser::ParseRadioBox(), vuGuiParser::ParseSlider(), vuConvexHull::setPoints(), vuConvexHull::sweepLine(), and vuTFDesign::vuTFDesign(). |
|
Copies the elements from the vector v to the instance.
Definition at line 246 of file vuDVector.h. |
|
Helper function for the creation of the dynamic data in the list.
Definition at line 225 of file vuDVector.h. |
|
Helper function for the destruction of the dynamic data in the list.
Definition at line 232 of file vuDVector.h. |
|
Returns the position of the element within the vector.
Definition at line 90 of file vuDVector.h. |
|
|
Returns the size of the vector.
Definition at line 66 of file vuDVector.h. |
|
Returns the step size of the vector.
Definition at line 52 of file vuDVector.h. |
|
Inserts an element at the given position in the vector. If inserting past the end of the list, the element is just added to the end. Definition at line 200 of file vuDVector.h. Referenced by vuTFDesign::addColour(), vuTFDesign::addOpacity(), and vuTFDesignSpec::setupMtlTriAlphaNodes(). |
|
Returns true if the element is stored in the vector.
Definition at line 81 of file vuDVector.h. Referenced by vuGuiParser::ParseButton(), vuGuiParser::ParseCheckBox(), vuGuiParser::ParseListBox(), vuGuiParser::ParseRadioBox(), vuGuiParser::ParseSlider(), and vuGuiParser::ParseStatement(). |
|
Assignment operator which does a deep copy.
Definition at line 160 of file vuDVector.h. |
|
Const Access operator allowing const access.
Definition at line 185 of file vuDVector.h. |
|
Access operator allowing access and modification of elements.
Definition at line 175 of file vuDVector.h. |
|
Removes the indexed element from the vector.
Definition at line 100 of file vuDVector.h. Referenced by vuConvexHull::angleThreshold(), vuTFDesign::removeColour(), vuTFDesign::removeOpacity(), and vuConvexHull::sweepLine(). |
|
Removes all elements from the vector.
Definition at line 106 of file vuDVector.h. Referenced by vuConvexHull::getCHull(), vuConvexHull::mergeULHulls(), and vuConvexHull::sweepLine(). |
|
Removes all the elements in the vector from start to end, inclusive. The indices of all elements with indices j, such that (j>end) become (j-(end-start+1)). Length is decreased by (j-(end-start+1)), but the size of the vector is not altered. Definition at line 117 of file vuDVector.h. Referenced by vuCamera::clear_lines(), vuKeyFramerDialog::clear_vectors(), vuTFDesignSpec::clearAllNodes(), vuTFDesign::clearAllNodes(), vuConvexHull::clearPoints(), vuCamera::load_cameras(), load_WithTime(), vuKeyFramerDialog::LoadFunc(), vuKeyFramerDialog::OnClose(), vuKeyFramerDialog::OnVideoClose(), vuKeyFramerDialog::RecordFunc(), vuKeyFramerDialog::SaveFunc(), vuTFDesignSpec::setupMtlTriAlphaNodes(), and vuKeyFramerDialog::~vuKeyFramerDialog(). |
|
Resizes the vector to the new size.
Definition at line 258 of file vuDVector.h. |
|
Sets the size of the vector. Vector size is the total allocated length of the vector. Definition at line 60 of file vuDVector.h. Referenced by vuHistogram::setSize(). |
|
Sets the stepsize of the vector. The vector is always clamped to a multiple of stepsize when it is increased. Definition at line 46 of file vuDVector.h. |
|
Resize the vector to be the same size as the number of data elements stored in it.
Definition at line 148 of file vuDVector.h. |
|
Resize the vector to be the multiple of the stepsize that is nearest to the length.
Definition at line 154 of file vuDVector.h. |
|
the data buffer of the vector
Definition at line 307 of file vuDVector.h. Referenced by vuDVector< LightNode >::copyData(). |
|
the current length of the vector (last used element)
Definition at line 304 of file vuDVector.h. Referenced by vuDVector< LightNode >::operator=(), and vuDVector< LightNode >::vuDVector(). |
|
the current size of the vector (including preallocated but not necessarily used elements)
Definition at line 302 of file vuDVector.h. Referenced by vuDVector< LightNode >::copyData(), vuDVector< LightNode >::operator=(), and vuDVector< LightNode >::vuDVector(). |
|
the current stepsize that is being used to expand the vector when the vector is expanded (note, this will change without warning).
Definition at line 305 of file vuDVector.h. Referenced by vuDVector< LightNode >::operator=(), and vuDVector< LightNode >::vuDVector(). |