SObjectizer 5.8
Loading...
Searching...
No Matches
so_5::stats::prefix_t Class Reference

A type for storing prefix of data_source name. More...

#include <prefix.hpp>

Public Member Functions

constexpr prefix_t () noexcept
 Default constructor creates empty prefix.
 
constexpr prefix_t (const char *value) noexcept
 Initializing constructor.
 
 prefix_t (const std::string &value) noexcept(noexcept(value.c_str()))
 Initializing constructor.
 
constexpr const char * c_str () const noexcept
 Access to prefix value.
 
constexpr std::string_view as_string_view () const noexcept(noexcept(std::string_view{std::declval< const char * >()}))
 Access to prefix value as string_view.
 
constexpr bool empty () const noexcept
 Is prefix empty?
 
bool operator== (const prefix_t &o) const noexcept
 Is equal?
 
bool operator!= (const prefix_t &o) const noexcept
 Is not equal?
 
bool operator< (const prefix_t &o) const noexcept
 Is less than?
 

Static Public Attributes

static constexpr const std::size_t max_length = 47
 Max length of prefix (not including 0-symbol at the end).
 
static constexpr const std::size_t max_buffer_size = max_length + 1
 Max size of buffer for prefix value (including 0-symbol at the end).
 

Private Attributes

char m_value [max_buffer_size]
 Actual value.
 

Detailed Description

A type for storing prefix of data_source name.

Since
v.5.5.4

Definition at line 31 of file prefix.hpp.

Constructor & Destructor Documentation

◆ prefix_t() [1/3]

so_5::stats::prefix_t::prefix_t ( )
inlineconstexprnoexcept

Default constructor creates empty prefix.

Definition at line 40 of file prefix.hpp.

◆ prefix_t() [2/3]

so_5::stats::prefix_t::prefix_t ( const char * value)
inlineconstexprnoexcept

Initializing constructor.

Gets no more than max_length symbols.

Definition at line 54 of file prefix.hpp.

◆ prefix_t() [3/3]

so_5::stats::prefix_t::prefix_t ( const std::string & value)
inlinenoexcept

Initializing constructor.

Gets no more than max_length symbols.

Definition at line 73 of file prefix.hpp.

Member Function Documentation

◆ as_string_view()

std::string_view so_5::stats::prefix_t::as_string_view ( ) const
inlinenodiscardconstexprnoexcept

Access to prefix value as string_view.

Since
v.5.8.2

Definition at line 91 of file prefix.hpp.

◆ c_str()

const char * so_5::stats::prefix_t::c_str ( ) const
inlinenodiscardconstexprnoexcept

Access to prefix value.

Definition at line 80 of file prefix.hpp.

◆ empty()

bool so_5::stats::prefix_t::empty ( ) const
inlinenodiscardconstexprnoexcept

Is prefix empty?

Definition at line 99 of file prefix.hpp.

◆ operator!=()

bool so_5::stats::prefix_t::operator!= ( const prefix_t & o) const
inlinenodiscardnoexcept

Is not equal?

Definition at line 115 of file prefix.hpp.

◆ operator<()

bool so_5::stats::prefix_t::operator< ( const prefix_t & o) const
inlinenodiscardnoexcept

Is less than?

Definition at line 122 of file prefix.hpp.

◆ operator==()

bool so_5::stats::prefix_t::operator== ( const prefix_t & o) const
inlinenodiscardnoexcept

Is equal?

Definition at line 107 of file prefix.hpp.

Member Data Documentation

◆ m_value

char so_5::stats::prefix_t::m_value[max_buffer_size]
private

Actual value.

Definition at line 130 of file prefix.hpp.

◆ max_buffer_size

const std::size_t so_5::stats::prefix_t::max_buffer_size = max_length + 1
staticconstexpr

Max size of buffer for prefix value (including 0-symbol at the end).

Definition at line 37 of file prefix.hpp.

◆ max_length

const std::size_t so_5::stats::prefix_t::max_length = 47
staticconstexpr

Max length of prefix (not including 0-symbol at the end).

Definition at line 35 of file prefix.hpp.


The documentation for this class was generated from the following file: