TReK C++
5.3.2
Telemetry/Command API
|
This class provides a wrapper for std::vector so different versions of the standard template library don't cause problems. The array is zero based. More...
#include <track_item_array.h>
Public Member Functions | |
void | Clear () |
Removes all of the items from the array. | |
uint32_t | Size () |
Returns the number of items in the array. | |
TrackItem * | GetAt (uint32_t index) |
Returns the item at the given location. More... | |
void | Add (TrackItem *item) |
Adds the item to the end of the array. More... | |
int32_t | Replace (uint32_t index, TrackItem *item) |
Replaces the item at the given location. More... | |
void | Resize (uint32_t input) |
Rezies the array to the input size. | |
Constructors, Destructor, and Other Basic Methods | |
TrackItemArray () | |
Default constructor of the class. | |
TrackItemArray (TrackItemArray &input) | |
Copy constructor of the class. | |
virtual | ~TrackItemArray () |
Class destructor. More... | |
void | operator= (TrackItemArray &right_side) |
Provides the equal operator. | |
TrackItemArray * | Clone () |
Returns an exact copy of the object;. | |
This class provides a wrapper for std::vector so different versions of the standard template library don't cause problems. The array is zero based.
|
virtual |
Class destructor.
Removes all resources created with this instance of the class.
void trek::TrackItemArray::Add | ( | TrackItem * | item | ) |
Adds the item to the end of the array.
[in] | item | The item to add to the end of the array. A copy of the item is made. |
Example:
TrackItem * trek::TrackItemArray::GetAt | ( | uint32_t | index | ) |
Returns the item at the given location.
If the index does not exists, a NULL pointer is returned.
[in] | index | The index to get the item for |
Example:
int32_t trek::TrackItemArray::Replace | ( | uint32_t | index, |
TrackItem * | item | ||
) |
Replaces the item at the given location.
If the specified index does not exist, an error is returned and no changes are made to the array. A copy of the item is made.
[in] | index | The location to change |
[in] | item | The new item for the location |
Example: