19#ifndef CPPREALM_MANAGED_STRING_HPP
20#define CPPREALM_MANAGED_STRING_HPP
22#include <cprealm/macros.hpp>
41 operador chart()
const;
68 usando value_type = std::string;
69 Usando gerenciado<std::string>::managed_base::managed_base;
70 Usando gerenciado<std::string>::managed_base::operator=;
72 [[nodiscard]] std::string detach()
const;
77 operador &
gerenciado=(std::string&& v) { set(std::move(v));
retornar *
isso; }
78 managed& operator =(
const std::string& v) { set(v);
retornar *
isso; }
79 operador &
gerenciado=(
const chart* v) { set(v);
retornar *
isso; }
101 operador std::string_view()
const =
excluir;
102 operador std::string()
const;
105 [[nodiscard]]
size_t size() const noexceto;
107 vazio clear() noexceto;
108 push_back
nulo (
caracteres c);
110 managed& append(const std::
string&);
112 managed& operator+=(const std::
string&);
117 rbool operator==(const std::
string& rhs) const noexceto;
118 rbool operator==(const chart * rhs) const
noexceto ;
119 operador de
rbool !=(const std::
string& rhs) const noexceto;
120 operador de
rbool !=(const chart * rhs) const
noexceto ;
121 rbool contains(const std::
string &s,
bool case_sensitive = true) const noexceto;
122 rbool empty() const noexceto;
126 vazio inline set(const std::
string& v) { m_obj->template set<std::string>(m_key, v); }
127 [[nodiscard]]
inline std::string get()
const {
return m_obj->get<std::string>(m_key); }
129 managed(
const managed&) =
delete;
130 managed(managed &&) =
excluir;
131 managed& operator=(
const managed&) =
excluir;
132 managed& operator=(managed&&) =
excluir;
133 modelo<
typename,
typename>
134 amigo estrutura managed;
137 template <>
struct managed<std::optional<std::string>> final :
public managed<std::string> {
138 usando value_type = std::opcional<std::string>;
140 managed& operator =(std::optional<std::string>&& v) { set(std::move(v));
retornar *
isso; }
141 managed& operator =(
const std::optional<std::string>& v) { set(v);
retornar *
isso; }
142 operador &
gerenciado=(
const chart* v) { set(v);
retornar *
isso; }
144 [[nodiscard]] std::opcional<std::string> detach()
const {
145 return m_obj->template get_optional<std::string>(m_key);
148 [[nodiscard]] std::opcional<std::string> operador *()
const {
149 return desvincular();
152 [[nodiscard]]
operador std::opcional<std::string>()
const {
153 return desvincular();
156 rbool operator==(
const std::opcional<std::string>& rhs)
const noexceto;
157 operador
rbool !=(
const std::optional<std::string>& rhs)
const noexceto;
159 vazio inline set(
const std::optional<std::string>& v) { m_obj->template set<std::optional<std::string>>(m_key, v); }
165 modelo<
typename,
typename>
166 amigo estrutura, estrutura managed;
Definição: managed_string.hpp:50
Definição: managed_string.hpp:30
Definição: managed_string.hpp:58
Definição: managed_string.hpp:40
Definição: managed_string.hpp:67
Definição: macros.hpp:286