MySQL 9.6.0
Source Code Documentation
mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp > Class Template Reference

Base class for all Out_str_growable_ptr* classes. More...

#include <out_str.h>

Inheritance diagram for mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >:
[legend]

Public Member Functions

template<class... Args_t>
requires mysql::meta::Not_decayed<This_t, Args_t...>
 Policy_growable_ptr (Args_t &&...args)
 Construct a new object, forwarding all arguments to the base class. More...
 
template<class... Args_t>
 Policy_growable_ptr (mysql::allocators::Memory_resource memory_resource, Args_t &&...args)
 Construct a new object with the given Memory_resource, forwarding all remaining arguments to the base class. More...
 
mysql::allocators::Memory_resource get_memory_resource () const
 Return the Memory_resource. More...
 
mysql::utils::Return_status resize (std::size_t size_arg) const
 Resize the character buffer and store the new size. More...
 

Static Public Attributes

static constexpr auto resize_policy = Resize_policy::growable
 
static constexpr auto null_terminated = null_terminated_tp
 

Private Types

using This_t = Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >
 

Private Attributes

mysql::allocators::Memory_resource m_memory_resource
 

Static Private Attributes

static constexpr size_t null_size
 

Detailed Description

template<class Char_tp, class Representation_tp, Null_terminated null_terminated_tp>
class mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >

Base class for all Out_str_growable_ptr* classes.

Template Parameters
Representation_tpbase class to inherit from, which provides the string representation.
null_terminated_tpIndicate whether the string should be null-terminated or not.

Member Typedef Documentation

◆ This_t

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
using mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::This_t = Policy_growable_ptr<Char_tp, Representation_tp, null_terminated_tp>
private

Constructor & Destructor Documentation

◆ Policy_growable_ptr() [1/2]

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
template<class... Args_t>
requires mysql::meta::Not_decayed<This_t, Args_t...>
mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::Policy_growable_ptr ( Args_t &&...  args)
inlineexplicit

Construct a new object, forwarding all arguments to the base class.

◆ Policy_growable_ptr() [2/2]

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
template<class... Args_t>
mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::Policy_growable_ptr ( mysql::allocators::Memory_resource  memory_resource,
Args_t &&...  args 
)
inlineexplicit

Construct a new object with the given Memory_resource, forwarding all remaining arguments to the base class.

Member Function Documentation

◆ get_memory_resource()

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
mysql::allocators::Memory_resource mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::get_memory_resource ( ) const
inline

Return the Memory_resource.

◆ resize()

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
mysql::utils::Return_status mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::resize ( std::size_t  size_arg) const
inline

Resize the character buffer and store the new size.

Parameters
size_argThe new size
Returns
Return_status::ok on success, Return_status::error if an out-of-memory error occurs.

Member Data Documentation

◆ m_memory_resource

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
mysql::allocators::Memory_resource mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::m_memory_resource
private

◆ null_size

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
constexpr size_t mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::null_size
staticconstexprprivate
Initial value:
=
(null_terminated_tp == Null_terminated::yes) ? 1 : 0

◆ null_terminated

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
constexpr auto mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::null_terminated = null_terminated_tp
staticconstexpr

◆ resize_policy

template<class Char_tp , class Representation_tp , Null_terminated null_terminated_tp>
constexpr auto mysql::strconv::detail::Policy_growable_ptr< Char_tp, Representation_tp, null_terminated_tp >::resize_policy = Resize_policy::growable
staticconstexpr

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