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