PIP
0.4.0_beta2
Platform-Independent Primitives
|
Set of any type. More...
Inherits set< Type, Compare, Allocator >.
Public Member Functions | |
PISet () | |
Contructs an empty set. | |
PISet (const Type &value) | |
Contructs set with one element "value". | |
PISet (const Type &v0, const Type &v1) | |
Contructs set with elements "v0" and "v1". | |
PISet (const Type &v0, const Type &v1, const Type &v2) | |
Contructs set with elements "v0", "v1" and "v2". | |
PISet (const Type &v0, const Type &v1, const Type &v2, const Type &v3) | |
Contructs set with elements "v0", "v1", "v2" and "v3". | |
int | size_s () const |
Returns elements count. | |
bool | isEmpty () const |
Returns if set is empty. | |
void | clear () |
Clear th set. | |
void | insert (const Type &t) |
Insert element "t" if it doesn`t exists in this set. | |
bool | operator[] (const Type &t) |
Returns if element "t" exists in this set. | |
PIVector< Type > | toVector () |
Returns content of set as PIVector. | |
Set of any type.
This class used to store collection of unique elements of any type. You can only add values to set with operator<< or with function insert(). You can discover if value already in set with operator[] or with function find(). These function has logarithmic complexity.