SObjectizer 5.8
|
Type for holding agent name. More...
#include <agent_tuning_options.hpp>
Public Member Functions | |
name_for_agent_t () | |
Default constructor makes an null value. | |
name_for_agent_t (std::string_view value) | |
Initializing constructor. | |
name_for_agent_t (const name_for_agent_t &) | |
name_for_agent_t & | operator= (const name_for_agent_t &) |
name_for_agent_t (name_for_agent_t &&other) noexcept | |
name_for_agent_t & | operator= (name_for_agent_t &&other) noexcept |
~name_for_agent_t () | |
std::string_view | as_string_view () const |
Get the value as a string_view. | |
bool | has_value () const noexcept |
Does this object have a value? | |
operator bool () const noexcept | |
Does this object have a value? | |
Private Attributes | |
std::unique_ptr< char[] > | m_value |
Name storage. | |
unsigned int | m_length |
Name length. | |
Friends | |
SO_5_FUNC void | swap (name_for_agent_t &a, name_for_agent_t &b) |
Type for holding agent name.
Unlike std::string it has no small-string optimization, but its size is just a (sizeof(char *)+sizeof(unsigned int)), so it is smaller than std::string in cases when agent's name is empty.
unsigned int
, not into std::size_t
, so name of agent can't exceed 4GiB if unsigned int
is 32-bit.Definition at line 85 of file agent_tuning_options.hpp.
so_5::name_for_agent_t::name_for_agent_t | ( | ) |
|
explicit |
so_5::name_for_agent_t::name_for_agent_t | ( | const name_for_agent_t & | other | ) |
|
noexcept |
|
default |
|
nodiscard |
|
nodiscardnoexcept |
|
inlineexplicitnoexcept |
Does this object have a value?
Definition at line 143 of file agent_tuning_options.hpp.
name_for_agent_t & so_5::name_for_agent_t::operator= | ( | const name_for_agent_t & | other | ) |
|
noexcept |
|
friend |
|
private |
Name length.
Definition at line 98 of file agent_tuning_options.hpp.
|
private |
Name storage.
Definition at line 95 of file agent_tuning_options.hpp.