Botan 3.13.0
Crypto and TLS for C&
Botan::detail::Container_Strong_Adapter_Base< T > Class Template Reference

#include <strong_type.h>

Inheritance diagram for Botan::detail::Container_Strong_Adapter_Base< T >:
Botan::detail::Strong_Base< T > Botan::detail::Strong_Adapter< T > Botan::detail::Strong_Adapter< T > Botan::detail::Strong_Adapter< T > Botan::Strong< T, TagTypeT, Capabilities > Botan::Strong< T, TagTypeT, Capabilities > Botan::Strong< T, TagTypeT, Capabilities >

Public Types

using const_iterator = typename T::const_iterator
 The const iterator type of the wrapped container.
using iterator = typename T::iterator
 The iterator type of the wrapped container.
using size_type = typename T::size_type
 The size type of the wrapped container.
using value_type = typename T::value_type
 The element type of the wrapped container.
using wrapped_type = T
 The type wrapped by this strong type.

Public Member Functions

decltype(auto) begin () const noexcept(noexcept(this->get().begin()))
decltype(auto) begin () noexcept(noexcept(this->get().begin()))
decltype(auto) cbegin () const noexcept(noexcept(this->get().cbegin()))
decltype(auto) cbegin () noexcept(noexcept(this->get().cbegin()))
decltype(auto) cend () const noexcept(noexcept(this->get().cend()))
decltype(auto) cend () noexcept(noexcept(this->get().cend()))
template<typename InputIt>
 Container_Strong_Adapter_Base (InputIt begin, InputIt end)
 Container_Strong_Adapter_Base (size_t size)
bool empty () const noexcept(noexcept(this->get().empty()))
decltype(auto) end () const noexcept(noexcept(this->get().end()))
decltype(auto) end () noexcept(noexcept(this->get().end()))
constexpr T & get () &
constexpr T && get () &&
constexpr const T & get () const &
constexpr const T && get () const &&
template<typename U>
decltype(auto) operator[] (U &&i) const noexcept(noexcept(this->get().operator[](i)))
template<typename U>
decltype(auto) operator[] (U &&i) noexcept(noexcept(this->get().operator[](i)))
void reserve (size_type size) noexcept(noexcept(this->get().reserve(size)))
void resize (size_type size) noexcept(noexcept(this->get().resize(size)))
size_type size () const noexcept(noexcept(this->get().size()))

Detailed Description

template<concepts::container T>
class Botan::detail::Container_Strong_Adapter_Base< T >

Forwards the container interface of the wrapped type

Definition at line 146 of file strong_type.h.

Member Typedef Documentation

◆ const_iterator

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::const_iterator = typename T::const_iterator

The const iterator type of the wrapped container.

Definition at line 158 of file strong_type.h.

◆ iterator

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::iterator = typename T::iterator

The iterator type of the wrapped container.

Definition at line 155 of file strong_type.h.

◆ size_type

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::size_type = typename T::size_type

The size type of the wrapped container.

Definition at line 152 of file strong_type.h.

◆ value_type

template<concepts::container T>
using Botan::detail::Container_Strong_Adapter_Base< T >::value_type = typename T::value_type

The element type of the wrapped container.

Definition at line 149 of file strong_type.h.

◆ wrapped_type

template<typename T>
using Botan::detail::Strong_Base< T >::wrapped_type = T
inherited

The type wrapped by this strong type.

Definition at line 81 of file strong_type.h.

Constructor & Destructor Documentation

◆ Container_Strong_Adapter_Base() [1/2]

template<concepts::container T>
Botan::detail::Container_Strong_Adapter_Base< T >::Container_Strong_Adapter_Base ( size_t size)
inlineexplicit

Create a container holding the given number of default constructed elements

Parameters
sizethe number of elements

Definition at line 165 of file strong_type.h.

References Container_Strong_Adapter_Base(), and size().

Referenced by Container_Strong_Adapter_Base(), and Container_Strong_Adapter_Base().

◆ Container_Strong_Adapter_Base() [2/2]

template<concepts::container T>
template<typename InputIt>
Botan::detail::Container_Strong_Adapter_Base< T >::Container_Strong_Adapter_Base ( InputIt begin,
InputIt end )
inline

Create a container from the elements of an iterator range

Parameters
beginstart of the range
endone past the end of the range

Definition at line 173 of file strong_type.h.

decltype(auto) begin() noexcept(noexcept(this->get().begin()))
decltype(auto) end() noexcept(noexcept(this->get().end()))

References begin(), Container_Strong_Adapter_Base(), and end().

Member Function Documentation

◆ begin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::begin ( ) const
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator to the first element

Definition at line 182 of file strong_type.h.

182{ return this->get().begin(); }
constexpr T & get() &

References Botan::detail::Strong_Base< T >::get().

◆ begin() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::begin ( )
inlinenoexcept

◆ cbegin() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cbegin ( ) const
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator to the first element

Definition at line 198 of file strong_type.h.

198{ return this->get().cbegin(); }

References Botan::detail::Strong_Base< T >::get().

◆ cbegin() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cbegin ( )
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator to the first element

Definition at line 194 of file strong_type.h.

194{ return this->get().cbegin(); }

References Botan::detail::Strong_Base< T >::get().

◆ cend() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cend ( ) const
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator one past the last element

Definition at line 206 of file strong_type.h.

206{ return this->get().cend(); }

References Botan::detail::Strong_Base< T >::get().

◆ cend() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::cend ( )
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator one past the last element

Definition at line 202 of file strong_type.h.

202{ return this->get().cend(); }

References Botan::detail::Strong_Base< T >::get().

◆ empty()

template<concepts::container T>
bool Botan::detail::Container_Strong_Adapter_Base< T >::empty ( ) const
inlinenoexcept

Query whether the wrapped container is empty

Returns
true if the container holds no elements

Definition at line 214 of file strong_type.h.

216 {
217 return this->get().empty();
218 }

References empty(), and Botan::detail::Strong_Base< T >::get().

Referenced by empty(), and Botan::TLS::Client_Hello_12::session_handle().

◆ end() [1/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::end ( ) const
inlinenoexcept

Iterate the wrapped container

Returns
a const iterator one past the last element

Definition at line 190 of file strong_type.h.

190{ return this->get().end(); }

References Botan::detail::Strong_Base< T >::get().

◆ end() [2/2]

template<concepts::container T>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::end ( )
inlinenoexcept

◆ get() [1/4]

template<typename T>
T & Botan::detail::Strong_Base< T >::get ( ) &
inlineconstexprinherited

Access the wrapped value

Returns
reference to the wrapped value

Definition at line 109 of file strong_type.h.

109{ return m_value; }

Referenced by Botan::detail::Strong_Adapter< T >::_const_time_poison(), Botan::detail::Strong_Adapter< T >::_const_time_unpoison(), Botan::detail::Strong_Adapter< T >::all_vartime(), Botan::detail::Strong_Adapter< T >::any_vartime(), Botan::detail::Strong_Adapter< T >::as(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::at(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Strong_Adapter< T >::back(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Container_Strong_Adapter_Base< T >::begin(), Botan::detail::Strong_Adapter< T >::capacity(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cbegin(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::detail::Container_Strong_Adapter_Base< T >::cend(), Botan::chain_lengths(), Botan::compute_root(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Strong_Adapter< T >::data(), Botan::detail::Container_Strong_Adapter_Base< T >::empty(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Container_Strong_Adapter_Base< T >::end(), Botan::detail::Strong_Adapter< T >::equals(), Botan::GF_Mask::expand(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::flip(), Botan::detail::Strong_Adapter< T >::from_bytes(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::front(), Botan::detail::Strong_Adapter< T >::hamming_weight(), Botan::detail::Strong_Adapter< T >::has_odd_hamming_weight(), Botan::ht_sign(), Botan::ht_verify(), Botan::GF_Mask::if_set_return(), Botan::GF_Mask::is_equal(), Botan::GF_Mask::is_lte(), Botan::GF_Mask::is_zero(), Botan::detail::Strong_Adapter< T >::none_vartime(), Botan::operator&(), Botan::operator&(), Botan::operator&(), Botan::operator&=(), Botan::operator&=(), Botan::Classic_McEliece_GF::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*(), Botan::operator*=(), Botan::operator*=(), Botan::operator+(), Botan::operator+(), Botan::operator+(), Botan::operator++(), Botan::operator++(), Botan::operator+=(), Botan::operator+=(), Botan::operator-(), Botan::operator-(), Botan::operator-(), Botan::operator--(), Botan::operator--(), Botan::operator-=(), Botan::operator-=(), Botan::operator/(), Botan::operator/(), Botan::operator/(), Botan::operator/=(), Botan::operator/=(), Botan::TLS::operator<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<(), Botan::operator<<=(), Botan::operator<<=(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator<=>(), Botan::operator==(), Botan::operator==(), Botan::operator==(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>(), Botan::operator>>=(), Botan::operator>>=(), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::detail::Container_Strong_Adapter_Base< T >::operator[](), Botan::operator^(), Botan::operator^(), Botan::operator^(), Botan::operator^=(), Botan::operator^=(), Botan::operator|(), Botan::operator|(), Botan::operator|(), Botan::operator|=(), Botan::operator|=(), Botan::HSS_LMS_Params::params_at_level(), Botan::detail::Strong_Adapter< T >::pop_back(), Botan::TLS::Cipher_State::psk(), Botan::detail::Strong_Adapter< T >::push_back(), Botan::detail::Strong_Adapter< T >::push_back(), Botan::Classic_McEliece_Encryptor::raw_kem_encrypt(), Botan::detail::Container_Strong_Adapter_Base< T >::reserve(), Botan::detail::Strong_Adapter< T >::reserve(), Botan::detail::Container_Strong_Adapter_Base< T >::resize(), Botan::GF_Mask::select(), Botan::GF_Mask::select(), Botan::detail::Strong_Adapter< T >::set(), Botan::Sphincs_Address::set_chain_address(), Botan::Sphincs_Address::set_hash_address(), Botan::HSS_LMS_PrivateKeyInternal::set_idx(), Botan::Sphincs_Address::set_keypair_address(), Botan::Sphincs_Address::set_layer_address(), Botan::Sphincs_Address::set_tree_address(), Botan::Sphincs_Address::set_tree_height(), Botan::Sphincs_Address::set_tree_index(), Botan::HSS_LMS_PrivateKeyInternal::sign(), Botan::LMS_PrivateKey::sign_and_get_pk(), Botan::HSS_Signature::signed_pub_key(), Botan::detail::Container_Strong_Adapter_Base< T >::size(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector(), Botan::detail::Strong_Adapter< T >::subvector_replace(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_bytes(), Botan::detail::Strong_Adapter< T >::to_string(), Botan::treehash(), Botan::detail::Strong_Adapter< T >::unset(), Botan::wots_public_key_from_signature(), and Botan::x448().

◆ get() [2/4]

template<typename T>
T && Botan::detail::Strong_Base< T >::get ( ) &&
inlineconstexprinherited

Access the wrapped value

Returns
rvalue reference to the wrapped value

Definition at line 117 of file strong_type.h.

117{ return std::move(m_value); }

◆ get() [3/4]

template<typename T>
const T & Botan::detail::Strong_Base< T >::get ( ) const &
inlineconstexprinherited

Access the wrapped value

Returns
const reference to the wrapped value

Definition at line 113 of file strong_type.h.

113{ return m_value; }

◆ get() [4/4]

template<typename T>
const T && Botan::detail::Strong_Base< T >::get ( ) const &&
inlineconstexprinherited

Access the wrapped value

Returns
const rvalue reference to the wrapped value

Definition at line 121 of file strong_type.h.

121{ return std::move(m_value); }

◆ operator[]() [1/2]

template<concepts::container T>
template<typename U>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::operator[] ( U && i) const
inlinenoexcept

Element access

Parameters
ithe index of the element
Returns
const reference to the element at index i

Definition at line 240 of file strong_type.h.

240 {
241 return this->get()[std::forward<U>(i)];
242 }

References Botan::detail::Strong_Base< T >::get().

◆ operator[]() [2/2]

template<concepts::container T>
template<typename U>
decltype(auto) Botan::detail::Container_Strong_Adapter_Base< T >::operator[] ( U && i)
inlinenoexcept

Element access

Parameters
ithe index of the element
Returns
reference to the element at index i

Definition at line 248 of file strong_type.h.

248 {
249 return this->get()[std::forward<U>(i)];
250 }

References Botan::detail::Strong_Base< T >::get().

◆ reserve()

template<concepts::container T>
void Botan::detail::Container_Strong_Adapter_Base< T >::reserve ( size_type size)
inlinenoexcept

Preallocate storage for the given number of elements

Parameters
sizethe number of elements to reserve capacity for

Definition at line 230 of file strong_type.h.

232 {
233 this->get().reserve(size);
234 }

References Botan::detail::Strong_Base< T >::get(), and size().

◆ resize()

template<concepts::container T>
void Botan::detail::Container_Strong_Adapter_Base< T >::resize ( size_type size)
inlinenoexcept

Change the number of elements held

Parameters
sizethe new number of elements

Definition at line 222 of file strong_type.h.

224 {
225 this->get().resize(size);
226 }

References Botan::detail::Strong_Base< T >::get(), and size().

◆ size()


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