26template<
typename TAllocator>
27class TBoxes :
public std::vector<Box, lang::StdAllocator<Box, TAllocator>> {
30 using vectorBase= std::vector<Box, lang::StdAllocator<Box, TAllocator>>;
62 template <
typename... TBoxables>
64 Box boxes[
sizeof...(args)]= { std::forward<TBoxables>( args )... };
85 template<
size_t TExtend>
92 template<
typename TAllocatorArgs>
113 template <
typename TBoxable>
120 template <
typename TBoxable>
130 void Reserve(
integer newCapacity) { vectorBase::reserve(
size_t( newCapacity ) ); }
140 template <
typename TFDecl,
typename... TArgs>
142 for(
auto& box : *
this )
143 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
156 template <
typename TFDecl,
typename... TArgs>
159 for(
auto& box : *
this )
160 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
173 for(
auto& box : *
this )
174 box.Clone( vectorBase::get_allocator().GetAllocator() );
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
void AddArray(const Box *boxArray, integer length)
TBoxes & operator<<(TBoxable &&src)
TBoxes & Add(TBoxables &&... args)
void CallAll(TArgs &&... args) const
TBoxes & Add(const Box &box)
TBoxes & Add(const TBoxes< TAllocatorArgs > &boxes)
TBoxes & Add(const Box(&boxArray)[TExtend])
void CallAll(TArgs &&... args)
TBoxes()
Defaulted default constructor, usable only with heap allocation.
TBoxes & operator=(TBoxes &)=delete
TBoxes & operator+=(TBoxable &&src)
TBoxes(TBoxes &)=delete
Deleted copy constructor.
void Reserve(integer newCapacity)
TBoxes(TAllocator &pAllocator)
std::vector< Box, lang::StdAllocator< Box, TAllocator > > vectorBase
The base type.
TAllocator AllocatorType
The allocator type that TAllocator specifies.
boxing::TBoxes< lang::HeapAllocator > Boxes
Type alias in namespace #"%alib".
lang::integer integer
Type alias in namespace #"%alib".
boxing::Box Box
Type alias in namespace #"%alib".
boxing::TBoxes< PoolAllocator > BoxesPA
Type alias in namespace #"%alib".
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace #"%alib".