#include <OnixS/CME/MDH/TinySet.h>
Public Types | |
| using | Item = Messaging::StrRef |
| using | ConstIterator = TinyStrSetIterator |
Public Member Functions | |
| TinyStrSet ()=default | |
| TinyStrSet (size_t capacity) | |
| TinyStrSet (const TinyStrSet &other)=default | |
| TinyStrSet (TinyStrSet &&other)=default | |
| TinyStrSet & | operator= (const TinyStrSet &other) |
| TinyStrSet & | operator= (TinyStrSet &&other) noexcept |
| ~TinyStrSet ()=default | |
| bool | empty () const noexcept |
| size_t | size () const noexcept |
| void | reserve (size_t capacity) |
| ConstIterator | begin () const |
| ConstIterator | end () const |
| ConstIterator | find (Item item) const |
| bool | insert (Item item) |
| bool | erase (Item item) noexcept |
| void | clear () noexcept |
| void | swap (TinyStrSet &other) noexcept |
Unlike TinySet<Messaging::StrRef>, this class copies the referenced characters into owned strings. Lookup is linear, and iteration follows insertion order.
| using ConstIterator = TinyStrSetIterator |
| using Item = Messaging::StrRef |
|
default |
Constructs an empty string set.
|
inlineexplicit |
Constructs an empty string set with storage reserved for at least the requested capacity.
| capacity | Number of strings for which to reserve storage. |
| std::length_error | If capacity exceeds the maximum supported size. |
| std::bad_alloc | If storage allocation fails. |
|
default |
Constructs a deep copy of another string set.
| other | String set to copy. |
| std::bad_alloc | If storage or string allocation fails. |
|
default |
Constructs a string set by transferring another set's storage.
| other | String set whose content is transferred. |
other remains valid but has unspecified content.
|
default |
Releases all owned string storage.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
Copies a string into the set unless equal content is already present.
| item | View of the characters to copy. |
| std::length_error | If the string or resulting set exceeds its maximum supported size. |
| std::bad_alloc | If string or storage allocation fails. |
item or depend on its lifetime after this call. Successful insertion can invalidate all iterators and returned views.
|
inline |
|
inlinenoexcept |
|
inline |
Reserves storage for at least the requested number of strings.
| capacity | Number of strings for which to reserve storage. |
| std::length_error | If capacity exceeds the maximum supported size. |
| std::bad_alloc | If storage allocation fails. |
|
inlinenoexcept |
|
inlinenoexcept |
Exchanges owned strings and capacity with another set.
| other | String set with which to exchange content. |