OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
TinyStrSetIterator Class Reference

#include <OnixS/CME/MDH/TinySet.h>

Classes

class  Pointer

Public Types

using Items = std::vector<std::string>
using ItemIterator = Items::const_iterator
using iterator_category = std::input_iterator_tag
using value_type = Messaging::StrRef
using difference_type = typename std::iterator_traits<ItemIterator>::difference_type
using pointer = Pointer
using reference = value_type

Public Member Functions

 TinyStrSetIterator ()=default
 TinyStrSetIterator (const TinyStrSetIterator &other)=default
 TinyStrSetIterator (TinyStrSetIterator &&other)=default
TinyStrSetIterator & operator= (const TinyStrSetIterator &other)=default
TinyStrSetIterator & operator= (TinyStrSetIterator &&other)=default
 TinyStrSetIterator (const ItemIterator &iterator)
 ~TinyStrSetIterator ()=default
Messaging::StrRef operator* () const
pointer operator-> () const
bool operator== (const TinyStrSetIterator &other) const
bool operator!= (const TinyStrSetIterator &other) const
TinyStrSetIterator & operator++ ()
TinyStrSetIterator operator++ (int)

Detailed Description

Note
Dereferencing returns a non-owning Messaging::StrRef. The referenced characters remain valid only while the underlying string remains unmodified and stored in its TinyStrSet.

Definition at line 268 of file TinySet.h.

Member Typedef Documentation

◆ difference_type

using difference_type = typename std::iterator_traits<ItemIterator>::difference_type

Signed type used to represent distances between iterators.

Definition at line 284 of file TinySet.h.

◆ ItemIterator

using ItemIterator = Items::const_iterator

Underlying iterator type.

Definition at line 275 of file TinySet.h.

◆ Items

using Items = std::vector<std::string>

String storage type traversed by the iterator.

Definition at line 272 of file TinySet.h.

◆ iterator_category

using iterator_category = std::input_iterator_tag

Iterator category used by standard algorithms.

Definition at line 278 of file TinySet.h.

◆ pointer

using pointer = Pointer

Pointer-like proxy type returned by operator->().

Definition at line 312 of file TinySet.h.

◆ reference

Type returned when the iterator is dereferenced.

Definition at line 315 of file TinySet.h.

◆ value_type

Value produced when the iterator is dereferenced.

Definition at line 281 of file TinySet.h.

Constructor & Destructor Documentation

◆ TinyStrSetIterator() [1/4]

TinyStrSetIterator ( )
default

Constructs a singular iterator.

Note
A singular iterator can only be assigned another iterator or destroyed.

◆ TinyStrSetIterator() [2/4]

TinyStrSetIterator ( const TinyStrSetIterator & other)
default

Constructs an iterator referring to the same position as another iterator.

Parameters
otherIterator to copy.

◆ TinyStrSetIterator() [3/4]

TinyStrSetIterator ( TinyStrSetIterator && other)
default

Constructs an iterator by moving another iterator.

Parameters
otherIterator whose state is moved.
Note
After the operation, other remains valid but has unspecified state.

◆ TinyStrSetIterator() [4/4]

TinyStrSetIterator ( const ItemIterator & iterator)
inlineexplicit

Wraps an iterator over TinyStrSet string storage.

Parameters
iteratorUnderlying iterator to wrap.

Definition at line 349 of file TinySet.h.

◆ ~TinyStrSetIterator()

~TinyStrSetIterator ( )
default

Destroys the iterator without affecting the underlying string.

Member Function Documentation

◆ operator!=()

bool operator!= ( const TinyStrSetIterator & other) const
inline

Checks whether two iterators refer to different positions.

Parameters
otherIterator to compare.
Returns
true if the iterators refer to different positions; otherwise false.
Precondition
Both iterators refer to the same TinyStrSet, or both are singular.

Definition at line 394 of file TinySet.h.

◆ operator*()

Messaging::StrRef operator* ( ) const
inline

Returns a non-owning view of the current string.

Returns
View of the string at the current iterator position.
Precondition
The iterator is dereferenceable.

Definition at line 362 of file TinySet.h.

◆ operator++() [1/2]

TinyStrSetIterator & operator++ ( )
inline

Advances to the next string.

Returns
This iterator after advancement.
Precondition
The iterator is dereferenceable.

Definition at line 403 of file TinySet.h.

◆ operator++() [2/2]

TinyStrSetIterator operator++ ( int )
inline

Advances to the next string while retaining the previous position.

Returns
Iterator referring to the position before advancement.
Precondition
The iterator is dereferenceable.

Definition at line 414 of file TinySet.h.

◆ operator->()

pointer operator-> ( ) const
inline

Provides pointer-like access to the current string view.

Returns
Proxy through which members of Messaging::StrRef can be accessed.
Precondition
The iterator is dereferenceable.

Definition at line 372 of file TinySet.h.

◆ operator=() [1/2]

TinyStrSetIterator & operator= ( const TinyStrSetIterator & other)
default

Makes this iterator refer to the same position as another iterator.

Parameters
otherIterator to copy.
Returns
This iterator.

◆ operator=() [2/2]

TinyStrSetIterator & operator= ( TinyStrSetIterator && other)
default

Replaces this iterator's state by moving another iterator.

Parameters
otherIterator whose state is moved.
Returns
This iterator.
Note
After the operation, other remains valid but has unspecified state.

◆ operator==()

bool operator== ( const TinyStrSetIterator & other) const
inline

Checks whether two iterators refer to the same position.

Parameters
otherIterator to compare.
Returns
true if both iterators refer to the same position; otherwise false.
Precondition
Both iterators refer to the same TinyStrSet, or both are singular.

Definition at line 383 of file TinySet.h.