OnixS C++ B3 Binary UMDF Market Data Handler 1.10.0
Users' manual and API documentation
Loading...
Searching...
No Matches
StrRef Class Reference

#include <OnixS/B3/MarketData/UMDF/messaging/StrRef.h>

Public Types

typedef size_t size_type
typedef const Charconst_iterator
typedef const_iterator iterator
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
typedef const_reverse_iterator reverse_iterator

Public Member Functions

constexpr StrRef ()
constexpr StrRef (const Char *chars, size_t size) noexcept
 StrRef (const Char *chars) noexcept
 StrRef (const std::string &string)
 __attribute__ ((__warn_unused_result__)) bool empty() const noexcept
 __attribute__ ((__warn_unused_result__)) const expr const Char *data() const noexcept
 __attribute__ ((__warn_unused_result__)) const expr size_type size() const noexcept
constexpr __attribute__ ((__warn_unused_result__)) size_type length() const noexcept
 __attribute__ ((__warn_unused_result__)) const _iterator begin() const noexcept
 __attribute__ ((__warn_unused_result__)) const _iterator end() const noexcept
 __attribute__ ((__warn_unused_result__)) const _iterator cbegin() const noexcept
 __attribute__ ((__warn_unused_result__)) const _iterator cend() const noexcept
 __attribute__ ((__warn_unused_result__)) const _reverse_iterator rbegin() const noexcept
 __attribute__ ((__warn_unused_result__)) const _reverse_iterator rend() const noexcept
 __attribute__ ((__warn_unused_result__)) const _reverse_iterator crbegin() const noexcept
 __attribute__ ((__warn_unused_result__)) const _reverse_iterator crend() const noexcept
 __attribute__ ((__warn_unused_result__)) const Char &operator[](size_type index) const noexcept
 __attribute__ ((__warn_unused_result__)) const Char &at(size_type index) const
const Charfront () const noexcept
const Charback () const noexcept
void swap (StrRef &other) noexcept
 operator std::basic_string< Char > () const

Detailed Description

Provides the efficient way of accessing text-based values without copying content of the text being referred.

Definition at line 62 of file StrRef.h.

Member Typedef Documentation

◆ const_iterator

typedef const Char* const_iterator

STL-like iterators.

Definition at line 68 of file StrRef.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> const_reverse_iterator

Definition at line 70 of file StrRef.h.

◆ iterator

Definition at line 69 of file StrRef.h.

◆ reverse_iterator

Definition at line 71 of file StrRef.h.

◆ size_type

typedef size_t size_type

Definition at line 65 of file StrRef.h.

Constructor & Destructor Documentation

◆ StrRef() [1/4]

StrRef ( )
inlineconstexpr

Initializes the instance referring to nothing.

Definition at line 75 of file StrRef.h.

◆ StrRef() [2/4]

StrRef ( const Char * chars,
size_t size )
inlineconstexprnoexcept

Explicit initialization.

Definition at line 83 of file StrRef.h.

◆ StrRef() [3/4]

StrRef ( const Char * chars)
inlinenoexcept

Explicit initialization.

Definition at line 90 of file StrRef.h.

◆ StrRef() [4/4]

StrRef ( const std::string & string)
inline

Explicit initialization.

Definition at line 104 of file StrRef.h.

Member Function Documentation

◆ __attribute__() [1/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept
Returns
true if the reference is empty, otherwise - false.

Definition at line 112 of file StrRef.h.

◆ __attribute__() [2/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like begin().

Definition at line 143 of file StrRef.h.

◆ __attribute__() [3/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like cbegin().

Definition at line 159 of file StrRef.h.

◆ __attribute__() [4/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like cend().

Definition at line 166 of file StrRef.h.

◆ __attribute__() [5/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like end().

Definition at line 151 of file StrRef.h.

◆ __attribute__() [6/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like crbegin().

Definition at line 187 of file StrRef.h.

◆ __attribute__() [7/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like crend().

Definition at line 194 of file StrRef.h.

◆ __attribute__() [8/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like rbegin().

Definition at line 173 of file StrRef.h.

◆ __attribute__() [9/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept

STL-like rend().

Definition at line 180 of file StrRef.h.

◆ __attribute__() [10/14]

__attribute__ ( (__warn_unused_result__) ) const &
inline

Provides the bound-checked per-item access.

Definition at line 211 of file StrRef.h.

◆ __attribute__() [11/14]

__attribute__ ( (__warn_unused_result__) ) const &
inlinenoexcept

Provides the per-item access.

Definition at line 201 of file StrRef.h.

◆ __attribute__() [12/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept
Returns
the read-only content.

Definition at line 119 of file StrRef.h.

◆ __attribute__() [13/14]

__attribute__ ( (__warn_unused_result__) ) const
inlinenoexcept
Returns
the number of characters.

Definition at line 127 of file StrRef.h.

◆ __attribute__() [14/14]

__attribute__ ( (__warn_unused_result__) ) const
inlineconstexprnoexcept
Returns
the the number of characters.

Definition at line 135 of file StrRef.h.

◆ back()

const Char & back ( ) const
inlinenoexcept
Returns
the reference to the last character in the view.

Definition at line 230 of file StrRef.h.

◆ front()

const Char & front ( ) const
inlinenoexcept
Returns
the reference to the first character in the view.

Definition at line 223 of file StrRef.h.

◆ operator std::basic_string< Char >()

operator std::basic_string< Char > ( ) const
inline

Converts to std::basic_string.

Definition at line 245 of file StrRef.h.

◆ swap()

void swap ( StrRef & other)
inlinenoexcept

Swaps the content with the given instance.

Definition at line 237 of file StrRef.h.