Inheritance diagram for OFUnorderedSet< T >:
Public Member Functions | |
OFUnorderedSet () | |
Default constructor. | |
OFUnorderedSet (const OFUnorderedSet< T > &src) | |
Copy constructor. | |
virtual | ~OFUnorderedSet () |
Destructor. | |
const OFUnorderedSet< T > & | operator= (const OFUnorderedSet< T > &src) |
operator=. | |
virtual OFBool | operator== (const OFUnorderedSet< T > &other) const |
Determines if two sets are identical. | |
virtual OFBool | operator!= (const OFUnorderedSet< T > &other) const |
Determines if two sets are not identical. | |
virtual void | Insert (const T &item) |
Inserts a new item into the set. | |
virtual void | Insert (const OFUnorderedSet< T > &other) |
Inserts all items of another set into this set. | |
virtual void | Remove (const T &item) |
Removes one item from the set. | |
virtual void | RemoveByIndex (unsigned int index) |
Removes one item from the set. | |
virtual T * | Find (const T &item) const |
Tries to find a given object in the set. | |
virtual OFBool | Contains (const T &item) const |
Determines if a certain item is contained in the set. | |
virtual OFBool | IsSupersetOf (const OFUnorderedSet< T > &other) const |
Determines if this is an actual superset of other, i.e. | |
virtual OFBool | IsSubsetOf (const OFUnorderedSet< T > &other) const |
Determines if this is an actual subset of other, i.e. | |
OFUnorderedSet< T > | Union (const OFUnorderedSet< T > &other) const |
Determines the union of the two sets this and other, i.e. | |
OFUnorderedSet< T > | Intersection (const OFUnorderedSet< T > &other) const |
Determines the intersection of the two sets this and other, i.e. | |
OFUnorderedSet< T > | Difference (const OFUnorderedSet< T > &other) const |
Determines the difference this - other, i.e. | |
OFUnorderedSet< T > | SymmetricDifference (const OFUnorderedSet< T > &other) const |
Determines the symmetric difference of this and other, i.e. |
Note the following properties of this class:
Definition at line 52 of file ofuoset.h.
OFUnorderedSet< T >::OFUnorderedSet | ( | const OFUnorderedSet< T > & | src | ) | [inline] |
const OFUnorderedSet<T>& OFUnorderedSet< T >::operator= | ( | const OFUnorderedSet< T > & | src | ) | [inline] |
operator=.
src | Source object whose values will be assigned to this. |
Definition at line 85 of file ofuoset.h.
References OFSet< T >::operator=().
virtual OFBool OFUnorderedSet< T >::operator== | ( | const OFUnorderedSet< T > & | other | ) | const [inline, virtual] |
Determines if two sets are identical.
other | Set which shall be compared with this. |
Definition at line 100 of file ofuoset.h.
References OFUnorderedSet< T >::Contains(), OFSet< T >::items, OFSet< T >::num, and OFUnorderedSet< T >::Remove().
virtual OFBool OFUnorderedSet< T >::operator!= | ( | const OFUnorderedSet< T > & | other | ) | const [inline, virtual] |
virtual void OFUnorderedSet< T >::Insert | ( | const T & | item | ) | [inline, virtual] |
Inserts a new item into the set.
item | Item which shall be inserted into the set. |
Implements OFSet< T >.
Definition at line 146 of file ofuoset.h.
References OFSet< T >::Resize().
Referenced by OFUnorderedSet< T >::Difference(), OFUnorderedSet< T >::Insert(), OFUnorderedSet< T >::Intersection(), and OFUnorderedSet< T >::Union().
virtual void OFUnorderedSet< T >::Insert | ( | const OFUnorderedSet< T > & | other | ) | [inline, virtual] |
Inserts all items of another set into this set.
other | set whose items shall be inserted into the set. |
Definition at line 166 of file ofuoset.h.
References OFUnorderedSet< T >::Insert(), OFSet< T >::items, and OFSet< T >::num.
virtual void OFUnorderedSet< T >::Remove | ( | const T & | item | ) | [inline, virtual] |
Removes one item from the set.
item | Item which shall be removed from the set. |
Implements OFSet< T >.
Definition at line 177 of file ofuoset.h.
Referenced by OFUnorderedSet< T >::Difference(), OFUnorderedSet< T >::Intersection(), OFUnorderedSet< T >::IsSupersetOf(), and OFUnorderedSet< T >::operator==().
virtual void OFUnorderedSet< T >::RemoveByIndex | ( | unsigned int | index | ) | [inline, virtual] |
Removes one item from the set.
index | Index of the item which shall be removed from the set. |
Implements OFSet< T >.
virtual T* OFUnorderedSet< T >::Find | ( | const T & | item | ) | const [inline, virtual] |
Tries to find a given object in the set.
In case the specified object could be found, a pointer to the corresponding element within the set is returned; in case the specified object could not be found, NULL will be returned.
item | Search pattern. |
Implements OFSet< T >.
virtual OFBool OFUnorderedSet< T >::Contains | ( | const T & | item | ) | const [inline, virtual] |
Determines if a certain item is contained in the set.
item | - Item which shall be looked for. |
Implements OFSet< T >.
Definition at line 268 of file ofuoset.h.
Referenced by OFUnorderedSet< T >::Difference(), OFUnorderedSet< T >::Intersection(), OFUnorderedSet< T >::IsSupersetOf(), and OFUnorderedSet< T >::operator==().
virtual OFBool OFUnorderedSet< T >::IsSupersetOf | ( | const OFUnorderedSet< T > & | other | ) | const [inline, virtual] |
Determines if this is an actual superset of other, i.e.
if this completely contains other and furthermore has additional elements.
other | - Set which shall be compared with this. |
Definition at line 288 of file ofuoset.h.
References OFUnorderedSet< T >::Contains(), OFSet< T >::items, OFSet< T >::num, and OFUnorderedSet< T >::Remove().
Referenced by OFUnorderedSet< T >::IsSubsetOf().
virtual OFBool OFUnorderedSet< T >::IsSubsetOf | ( | const OFUnorderedSet< T > & | other | ) | const [inline, virtual] |
Determines if this is an actual subset of other, i.e.
if this is completely contained in other and other furthermore has additional elements.
other | - Set which shall be compared with this. |
Definition at line 326 of file ofuoset.h.
References OFUnorderedSet< T >::IsSupersetOf().
OFUnorderedSet<T> OFUnorderedSet< T >::Union | ( | const OFUnorderedSet< T > & | other | ) | const [inline] |
Determines the union of the two sets this and other, i.e.
the set containing all items which can be found either in this or in other, and returns the resulting new set.
other | Second parameter for union. |
Definition at line 338 of file ofuoset.h.
References OFUnorderedSet< T >::Insert().
Referenced by OFUnorderedSet< T >::SymmetricDifference().
OFUnorderedSet<T> OFUnorderedSet< T >::Intersection | ( | const OFUnorderedSet< T > & | other | ) | const [inline] |
Determines the intersection of the two sets this and other, i.e.
the set containing all items which can be found in both this and other, and returns the resulting new set.
other | Second parameter for intersection. |
Definition at line 357 of file ofuoset.h.
References OFUnorderedSet< T >::Contains(), OFUnorderedSet< T >::Insert(), and OFUnorderedSet< T >::Remove().
OFUnorderedSet<T> OFUnorderedSet< T >::Difference | ( | const OFUnorderedSet< T > & | other | ) | const [inline] |
Determines the difference this - other, i.e.
the set containing all the items found in this but not in other, and returns the resulting new set.
other | Second parameter for difference. |
Definition at line 391 of file ofuoset.h.
References OFUnorderedSet< T >::Contains(), OFUnorderedSet< T >::Insert(), and OFUnorderedSet< T >::Remove().
Referenced by OFUnorderedSet< T >::SymmetricDifference().
OFUnorderedSet<T> OFUnorderedSet< T >::SymmetricDifference | ( | const OFUnorderedSet< T > & | other | ) | const [inline] |
Determines the symmetric difference of this and other, i.e.
the set containing all the items which can be found either in this or in other but not in the intersection of this and other, and returns the resulting new set.
other | Second parameter for symmetric difference. |
Definition at line 428 of file ofuoset.h.
References OFUnorderedSet< T >::Difference(), and OFUnorderedSet< T >::Union().