OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
TinyStrSet Class Reference

Public Types

typedef StrRef Item
typedef TinyStrSetIterator ConstIterator

Public Member Functions

 TinyStrSet ()
 TinyStrSet (size_t capacity)
 TinyStrSet (const TinyStrSet &other)
 ~TinyStrSet ()
bool empty () const
size_t size () const
void reserve (size_t capacity)
ConstIterator begin () const
ConstIterator end () const
ConstIterator find (const Item &item) const
bool insert (const Item &item)
bool erase (const Item &item)
void clear ()
void swap (TinyStrSet &other)

Detailed Description

Implements TinySet for StrRef class.

In contrast to TinySet<StrRef> instantiation, given class allocates space for content being referenced by StrRef instances inserted into the given set thus making content safe for referencing.

Definition at line 306 of file TinySet.h.

Member Typedef Documentation

◆ ConstIterator

Aliases iterator type.

Definition at line 350 of file TinySet.h.

◆ Item

typedef StrRef Item

Items of collection.

Definition at line 345 of file TinySet.h.

Constructor & Destructor Documentation

◆ TinyStrSet() [1/3]

TinyStrSet ( )
inline

Initializes the empty set.

Definition at line 353 of file TinySet.h.

◆ TinyStrSet() [2/3]

TinyStrSet ( size_t capacity)
inlineexplicit

Initializes the empty set capacious enough to store the given number of items.

Definition at line 360 of file TinySet.h.

◆ TinyStrSet() [3/3]

TinyStrSet ( const TinyStrSet & other)
inline

Initializes as a copy of the other instance.

Definition at line 367 of file TinySet.h.

◆ ~TinyStrSet()

~TinyStrSet ( )
inline

Destructs the internal storage.

Definition at line 374 of file TinySet.h.

Member Function Documentation

◆ begin()

ConstIterator begin ( ) const
inline

Provides iterating facilities.

Definition at line 401 of file TinySet.h.

◆ clear()

void clear ( )
inline

Brings the set to the blank (empty) state.

Definition at line 478 of file TinySet.h.

◆ empty()

bool empty ( ) const
inline

Indicates whether the set is empty.

Definition at line 379 of file TinySet.h.

◆ end()

ConstIterator end ( ) const
inline

Provides iterating facilities.

Definition at line 410 of file TinySet.h.

◆ erase()

bool erase ( const Item & item)
inline

Removes the given item from the set.

Returned value indicates whether item was actually erased.

Definition at line 458 of file TinySet.h.

◆ find()

ConstIterator find ( const Item & item) const
inline

Looks for the given item and returns iterator pointing to the found entry or to nowhere.

Definition at line 420 of file TinySet.h.

◆ insert()

bool insert ( const Item & item)
inline

Inserts the given item into the set.

Content referenced by the item being inserted is copied into the internal storage.

Returned value indicates whether the item was actually inserted.

Definition at line 440 of file TinySet.h.

◆ reserve()

void reserve ( size_t capacity)
inline

Makes the internal storage capacious enough to store the given number of items.

Definition at line 393 of file TinySet.h.

◆ size()

size_t size ( ) const
inline

Returns the number of items in the set.

Definition at line 385 of file TinySet.h.

◆ swap()

void swap ( TinyStrSet & other)
inline

Exchanges content with the other instance.

Definition at line 485 of file TinySet.h.