Holds a list of SLDevice instances.
More...
#include <SLDeviceList.hpp>
Collaboration diagram for SLDeviceList:
[legend]List of all members.
Detailed Description
Holds a list of SLDevice instances.
- Author:
- Alexandre Sauve
- See also:
- SLDevice
SLString uses shared_ptr, see the Library section for details.
This class is optimized for fast copy by value.
Example of code :
Constructor & Destructor Documentation
SLDeviceList::SLDeviceList |
( |
unsigned int |
initial_capacity |
) |
|
|
|
Build the list with an initial capacity. The initial_capacity allow to avoid frequent reallocations. |
Member Function Documentation
const SLDevice& SLDeviceList::operator[] |
( |
unsigned int |
index |
) |
|
|
|
The [] operator allow to read and write to the list as it was an array. - Returns:
- a SLDevice that is leak-proof.
|
void SLDeviceList::push_back |
( |
const SLDevice & |
dev |
) |
|
|
|
This function works like std::vector. There is no memory allocation while the size of the list remains bellow the initial capacity. |
unsigned int SLDeviceList::size |
( |
|
) |
|
|
|
Gets the size of the list. - Returns:
- the current number of inserted items.
|
void SLDeviceList::sort |
( |
|
) |
|
|
|
The list is unsorted by default. So this function does this work.
Note: If called more than once, the sort done only one time. |
Member Data Documentation
|
This variables is true after the 1st call to sort() |
|
This variable hold the various data used by the string in an efficient and memory leaks proof way. |
The documentation for this class was generated from the following file:
Generated on Mon Apr 19 01:03:35 2004 for segusoLand by
1.3.6-20040222