MySQL 9.1.0
Source Code Documentation
Plugin_array Class Reference

Plugin array helper class. More...

#include <sql_plugin_ref.h>

Inheritance diagram for Plugin_array:
[legend]

Public Member Functions

 Plugin_array (PSI_memory_key psi_key)
 Class construction. More...
 
bool exists (plugin_ref plugin)
 Check, whether the plugin specified by the plugin argument has been already added into the array. More...
 
- Public Member Functions inherited from Prealloced_array< plugin_ref, 2 >
 Prealloced_array (PSI_memory_key psi_key)
 
 Prealloced_array (PSI_memory_key psi_key, size_t initial_size)
 Initializes (parts of) the array with default values. More...
 
 Prealloced_array (const Prealloced_array &that)
 An object instance "owns" its array, so we do deep copy here. More...
 
 Prealloced_array (Prealloced_array &&that)
 
 Prealloced_array (PSI_memory_key psi_key, const_iterator first, const_iterator last)
 Range constructor. More...
 
 Prealloced_array (std::initializer_list< plugin_ref > elems)
 
Prealloced_arrayoperator= (const Prealloced_array &that)
 Copies all the elements from 'that' into this container. More...
 
Prealloced_arrayoperator= (Prealloced_array &&that)
 
 ~Prealloced_array ()
 Runs DTOR on all elements if needed. More...
 
size_t capacity () const
 
size_t element_size () const
 
bool empty () const
 
size_t size () const
 
plugin_refat (size_t n)
 
const plugin_refat (size_t n) const
 
plugin_refoperator[] (size_t n)
 
const plugin_refoperator[] (size_t n) const
 
plugin_refback ()
 
const plugin_refback () const
 
plugin_reffront ()
 
const plugin_reffront () const
 
iterator begin ()
 begin : Returns a pointer to the first element in the array. More...
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cbegin () const
 Returns a constant pointer to the first element in the array. More...
 
const_iterator cend () const
 Returns a constant pointer to the past-the-end element in the array. More...
 
bool assign_at (size_t n, const value_type &val)
 Assigns a value to an arbitrary element, even where n >= size(). More...
 
bool reserve (size_t n)
 Reserves space for array elements. More...
 
void claim_memory_ownership (bool claim)
 Claim memory ownership. More...
 
bool push_back (const plugin_ref &element)
 Copies an element into the back of the array. More...
 
bool push_back (plugin_ref &&element)
 Copies (or moves, if possible) an element into the back of the array. More...
 
bool emplace_back (Args &&...args)
 Constructs an element at the back of the array. More...
 
void pop_back ()
 Removes the last element in the array, effectively reducing the container size by one. More...
 
iterator insert (const_iterator position, const value_type &val)
 The array is extended by inserting a new element before the element at the specified position. More...
 
iterator insert (const_iterator position, value_type &&val)
 The array is extended by inserting a new element before the element at the specified position. More...
 
iterator emplace (const_iterator position, Args &&...args)
 The array is extended by inserting a new element before the element at the specified position. More...
 
std::pair< iterator, bool > insert_unique (const value_type &val)
 Similar to std::set<>::insert() Extends the array by inserting a new element, but only if it cannot be found in the array already. More...
 
size_type erase_unique (const value_type &val)
 Similar to std::set<>::erase() Removes a single element from the array by value. More...
 
size_type count_unique (const value_type &val) const
 Similar to std::set<>::count() More...
 
iterator erase (const_iterator position)
 Removes a single element from the array. More...
 
iterator erase (size_t ix)
 Removes a single element from the array. More...
 
iterator erase (const_iterator first, const_iterator last)
 Removes a range of elements from the array. More...
 
void erase_at_end (const_iterator first)
 Removes tail elements from the array. More...
 
void swap (Prealloced_array &rhs)
 Exchanges the content of the container by the content of rhs, which is another vector object of the same type. More...
 
void shrink_to_fit ()
 Requests the container to reduce its capacity to fit its size. More...
 
void resize (size_t n, const plugin_ref &val=plugin_ref())
 Resizes the container so that it contains n elements. More...
 
void clear ()
 Removes (and destroys) all elements. More...
 

Additional Inherited Members

- Public Types inherited from Prealloced_array< plugin_ref, 2 >
typedef plugin_ref value_type
 Standard typedefs. More...
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef plugin_refiterator
 
typedef const plugin_refconst_iterator
 
- Public Attributes inherited from Prealloced_array< plugin_ref, 2 >
External m_ext
 
plugin_ref m_buff [Prealloc]
 
- Static Public Attributes inherited from Prealloced_array< plugin_ref, 2 >
static const size_t initial_capacity
 Initial capacity of the array. More...
 

Detailed Description

Plugin array helper class.

Constructor & Destructor Documentation

◆ Plugin_array()

Plugin_array::Plugin_array ( PSI_memory_key  psi_key)
inlineexplicit

Class construction.

Parameters
psi_keyPSI key.

Member Function Documentation

◆ exists()

bool Plugin_array::exists ( plugin_ref  plugin)
inline

Check, whether the plugin specified by the plugin argument has been already added into the array.

Parameters
pluginPlugin to check.
Return values
truePlugin has been already added.
falseThere is no plugin in the array.

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