Botan 3.14.1
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 118 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 130 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 127 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 124 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 121 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 53 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 137 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 145 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 154 of file strong_type.h.

154{ return this->get().begin(); }
constexpr T & get() &
Definition strong_type.h:81

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 170 of file strong_type.h.

170{ 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 166 of file strong_type.h.

166{ 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 178 of file strong_type.h.

178{ 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 174 of file strong_type.h.

174{ 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 186 of file strong_type.h.

188 {
189 return this->get().empty();
190 }

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 162 of file strong_type.h.

162{ 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 81 of file strong_type.h.

81{ 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::Dilithium_Expanded_Keypair_Codec::encode_keypair(), 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::lmots_compute_pubkeys(), Botan::LMOTS_Private_Key::LMOTS_Private_Key(), 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::Sphincs_Hash_Functions::PRF_batch(), 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::detail::Strong_Adapter< T >::set_range(), 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::detail::Strong_Adapter< T >::unset_range(), Botan::wots_public_key_from_signature(), Botan::wots_sign_and_pkgen(), 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 89 of file strong_type.h.

89{ 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 85 of file strong_type.h.

85{ 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 93 of file strong_type.h.

93{ 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 212 of file strong_type.h.

212 {
213 return this->get()[std::forward<U>(i)];
214 }

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 220 of file strong_type.h.

220 {
221 return this->get()[std::forward<U>(i)];
222 }

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 202 of file strong_type.h.

204 {
205 this->get().reserve(size);
206 }

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 194 of file strong_type.h.

196 {
197 this->get().resize(size);
198 }

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

◆ size()


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