ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
T_Boxer< std::vector< TElement >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) > Struct Template Reference

Description:

template<typename TElement>
struct alib::boxing::compatibility::std::T_Boxer< std::vector< TElement >, ATMP_VOID_IF(!characters::TT_IsChar< TElement >::value) >

Specialization of struct T_Boxer for template type std::vector<T, std::allocator<T>> Instead of boxing a pointer to the vector object, a boxed array is stored, hence a pointer to the first element contents and the array length.

To enable this behavior, header file "alib/compatibility/std_boxing.hpp"

needs to be included in the corresponding compilation unit.

Excluded from the specialization are character arrays. Boxing of std::vector instances of those types is customized by the specialization of T_CharArray , as described in manual chapter 10. Boxing Character Strings.

Note
As mandatory, the specialization is defined in alib::boxing. To keep the reference documentation of that namespace clean, it is documented here.
Template Parameters
TElementThe element type of the vector.

Definition at line 118 of file std_boxing.hpp.

#include <std_boxing.hpp>

Public Type Index:

using Mapping = TMappedToArrayOf<TElement>
 

Public Static Method Index:

static void Read (const Placeholder &src)
 
static void Write (Placeholder &target, const std::vector< TElement > &value)
 

Type Definition Details:

◆ Mapping

template<typename TElement >
using Mapping = TMappedToArrayOf<TElement>

Mapped type is TElement[].

Definition at line 121 of file std_boxing.hpp.

Method Details:

◆ Read()

template<typename TElement >
static void Read ( const Placeholder & src)
static

Forbid unboxing by declaring Read as void.

Parameters
srcIgnored.

◆ Write()

template<typename TElement >
static void Write ( Placeholder & target,
const std::vector< TElement > & value )
inlinestatic

Implementation of custom boxing for template class std::vector

Parameters
targetThe placeholder of the target box.
valueThe object to box.

Definition at line 128 of file std_boxing.hpp.

Here is the call graph for this function:

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