Wiretap API  <small>Wiretap 2018.1</small>
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WireTapStrList Class Reference

This class is a list of WireTapStr objects. More...

Public Member Functions

const char * getStr (unsigned int index) const
 Accesses a string in a WireTapStrList object. More...
 
WireTapStrListoperator= (const WireTapStrList &src)
 Assignment operator that returns a reference to the source WireTapStrList object. More...
 
bool operator== (const WireTapStrList &stringListObject) const
 Comparison operator used for two WireTapStrList objects. More...
 
const char * operator[] (unsigned int index) const
 Operator used to access a string in a WireTapStrList object. More...
 
void push_back (const char *aString)
 Appends a string to the WireTapStrList object. More...
 
void 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. More...
 
void resize (int numberOfStrings)
 Sets the size of the WireTapStrList object to a specified number of strings. More...
 
unsigned int size () const
 Gets the number of strings contained in the WireTrapStrList object. More...
 
 WireTapStrList ()
 Constructs an empty WireTapStrList object. More...
 
 WireTapStrList (const WireTapStrList &original)
 Copy constructor. More...
 
virtual ~WireTapStrList ()
 Destructor. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

WireTapStrList::WireTapStrList ( )

Constructs an empty WireTapStrList object.

WireTapStrList::WireTapStrList ( const WireTapStrList original)

Copy constructor.

Constructs a WireTapStrList object duplicating the content of the original.

Parameters
originalAn input parameter. The WireTapStrList object that is to be copied.
virtual WireTapStrList::~WireTapStrList ( )
virtual

Destructor.

Member Function Documentation

const char* WireTapStrList::getStr ( unsigned int  index) const

Accesses a string in a WireTapStrList object.

Parameters
indexAn 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.
WireTapStrList& WireTapStrList::operator= ( const WireTapStrList src)

Assignment operator that returns a reference to the source WireTapStrList object.

Parameters
srcAn input parameter. The WireTapStrList object to which the reference should point.
Returns
A reference to the current WireTapStrList object.
bool WireTapStrList::operator== ( const WireTapStrList stringListObject) const

Comparison operator used for two WireTapStrList objects.

Parameters
stringListObject
Returns
true if the two lists represented by the objects are identical.
const char* WireTapStrList::operator[] ( unsigned int  index) const

Operator used to access a string in a WireTapStrList object.

Parameters
indexAn 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.
void WireTapStrList::push_back ( const char *  aString)

Appends a string to the WireTapStrList object.

The string is copied.

Parameters
aStringAn input parameter. A null-terminated ASCII string to be added to the list.
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
numberOfStringsAn input parameter. The number of strings for which space will be reserved.
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
numberOfStringsAn input parameter. The size of the list. Must be greater than or equal to zero.
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: