This class is a list of WireTapStr objects.
More...
This class is a list of WireTapStr objects.
Similar to WireTapStr, WireTapStrList is a customized version of a standard C type: std::list.
- See also
- WireTapStr.
◆ WireTapStrList() [1/3]
WireTapStrList::WireTapStrList |
( |
| ) |
|
◆ WireTapStrList() [2/3]
Copy constructor.
Constructs a WireTapStrList object duplicating the content of the original.
- Parameters
-
original | An input parameter. The WireTapStrList object that is to be copied. |
◆ WireTapStrList() [3/3]
Move constructor.
Constructs a WireTapStrList object by moving the content of the original.
- Parameters
-
original | An input parameter. The WireTapStrList object that is to be moved. |
◆ ~WireTapStrList()
virtual WireTapStrList::~WireTapStrList |
( |
| ) |
|
|
virtual |
◆ getStr()
const char* WireTapStrList::getStr |
( |
unsigned int |
index | ) |
const |
Accesses a string in a WireTapStrList object.
- Parameters
-
index | An input parameter. A valid index on the string list represented by the WireTapStrList object. Indices start at 0. The length of the list can be obtained by calling the WireTapStrList.size method. |
- Returns
- A pointer to the null-terminated string at the specified index.
◆ operator=() [1/2]
Assignment operator that returns a reference to the source WireTapStrList object.
- Parameters
-
src | An input parameter. The WireTapStrList object to which the reference should point. |
- Returns
- A reference to the current WireTapStrList object.
◆ operator=() [2/2]
Move operator that returns a reference to the source WireTapStrList object.
- Parameters
-
- Returns
- A reference to the current WireTapStrList object.
◆ operator==()
bool WireTapStrList::operator== |
( |
const WireTapStrList & |
stringListObject | ) |
const |
Comparison operator used for two WireTapStrList objects.
- Parameters
-
- Returns
- true if the two lists represented by the objects are identical.
◆ operator[]()
const char* WireTapStrList::operator[] |
( |
unsigned int |
index | ) |
const |
Operator used to access a string in a WireTapStrList object.
- Parameters
-
index | An input parameter. A valid index on the string list represented by the WireTapStrList object. Indices start at 0. The length of the list can be obtained by calling the WireTapStrList.size method. |
- Returns
- A pointer to the null-terminated string at the specified index.
◆ push_back()
void WireTapStrList::push_back |
( |
const char * |
aString | ) |
|
Appends a string to the WireTapStrList object.
The string is copied.
- Parameters
-
aString | An input parameter. A null-terminated ASCII string to be added to the list. |
◆ reserve()
void WireTapStrList::reserve |
( |
int |
numberOfStrings | ) |
|
Reserves space in the WireTapStrList object without increasing its size. This function is typically used to optimize allocations if the list size is known prior to starting to fill it with calls to WireTapStrList.push_back.
- Parameters
-
numberOfStrings | An input parameter. The number of strings for which space will be reserved. |
◆ resize()
void WireTapStrList::resize |
( |
int |
numberOfStrings | ) |
|
Sets the size of the WireTapStrList object to a specified number of strings.
The list is either truncated or padded with empty strings
- Parameters
-
numberOfStrings | An input parameter. The size of the list. Must be greater than or equal to zero. |
◆ size()
unsigned int WireTapStrList::size |
( |
| ) |
const |
Gets the number of strings contained in the WireTrapStrList object.
- Returns
- An unsigned integer that indicates how many strings are actually contained in the WireTapStrList object. If the list has been resized (using the method resize), it may contain empty strings.
The documentation for this class was generated from the following file: