OnixS C++ Euronext Optiq MDG Handler 1.3.3
API documentation
Loading...
Searching...
No Matches
StrRef Class Reference

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)
bool empty () const noexcept
constexpr const Chardata () const noexcept
constexpr size_type size () const noexcept
constexpr size_type length () const noexcept
const_iterator begin () const noexcept
const_iterator end () const noexcept
const_iterator cbegin () const noexcept
const_iterator cend () const noexcept
const_reverse_iterator rbegin () const noexcept
const_reverse_iterator rend () const noexcept
const_reverse_iterator crbegin () const noexcept
const_reverse_iterator crend () const noexcept
const Charoperator[] (size_type index) const noexcept
const Charat (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

◆ at()

const Char & at ( size_type index) const
inline

Provides the bound-checked per-item access.

Definition at line 212 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.

◆ begin()

const_iterator begin ( ) const
inlinenoexcept

STL-like begin().

Definition at line 144 of file StrRef.h.

◆ cbegin()

const_iterator cbegin ( ) const
inlinenoexcept

STL-like cbegin().

Definition at line 160 of file StrRef.h.

◆ cend()

const_iterator cend ( ) const
inlinenoexcept

STL-like cend().

Definition at line 167 of file StrRef.h.

◆ crbegin()

const_reverse_iterator crbegin ( ) const
inlinenoexcept

STL-like crbegin().

Definition at line 188 of file StrRef.h.

◆ crend()

const_reverse_iterator crend ( ) const
inlinenoexcept

STL-like crend().

Definition at line 195 of file StrRef.h.

◆ data()

const Char * data ( ) const
inlineconstexprnoexcept
Returns
the read-only content.

Definition at line 121 of file StrRef.h.

◆ empty()

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

Definition at line 113 of file StrRef.h.

◆ end()

const_iterator end ( ) const
inlinenoexcept

STL-like end().

Definition at line 152 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.

◆ length()

size_type length ( ) const
inlineconstexprnoexcept
Returns
the the number of characters.

Definition at line 137 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.

◆ operator[]()

const Char & operator[] ( size_type index) const
inlinenoexcept

Provides the per-item access.

Definition at line 202 of file StrRef.h.

◆ rbegin()

const_reverse_iterator rbegin ( ) const
inlinenoexcept

STL-like rbegin().

Definition at line 174 of file StrRef.h.

◆ rend()

const_reverse_iterator rend ( ) const
inlinenoexcept

STL-like rend().

Definition at line 181 of file StrRef.h.

◆ size()

size_type size ( ) const
inlineconstexprnoexcept
Returns
the number of characters.

Definition at line 129 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.