8#ifndef HPP_ALIB_BOXING_BOXES
9#define HPP_ALIB_BOXING_BOXES 1
11#if !defined(HPP_ALIB_BOXING_BOXING)
12# error "ALib sources with ending '.inl' must not be included from outside."
39template<
typename TAllocator>
40class TBoxes :
public std::vector<Box, lang::StdContainerAllocator<Box, TAllocator>>
44 using vectorBase= std::vector<Box, lang::StdContainerAllocator<Box, TAllocator>>;
87 template <
typename... TBoxables>
90 Box boxes[
sizeof...(args)]= { std::forward<TBoxables>( args )... };
116 template<
size_t TExtend>
129 template<
typename TAllocatorArgs>
154 template <
typename TBoxable>
166 template <
typename TBoxable>
178 return static_cast<integer>( vectorBase::size() );
188 vectorBase::reserve(
size_t( newCapacity ) );
201 template <
typename TFDecl,
typename... TArgs>
204 for(
auto& box : *
this )
205 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
220 template <
typename TFDecl,
typename... TArgs>
223 for(
auto& box : *
this )
224 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
239 for(
auto& box : *
this )
240 box.Clone( vectorBase::get_allocator().GetAllocator() );
void CallAll(TArgs &&... args)
std::vector< Box, lang::StdContainerAllocator< Box, TAllocator > > vectorBase
The allocator type that TAllocator specifies.
TBoxes & Add(const Box &box)
void Reserve(integer newCapacity)
TBoxes(TAllocator &pAllocator)
TBoxes & operator=(TBoxes &)=delete
void AddArray(const Box *boxArray, integer length)
TAllocator AllocatorType
The allocator type that TAllocator specifies.
void CallAll(TArgs &&... args) const
TBoxes()
Defaulted default constructor, usable only with heap allocation.
TBoxes & Add(const Box(&boxArray)[TExtend])
TBoxes & operator+=(TBoxable &&src)
TBoxes & operator<<(TBoxable &&src)
TBoxes(TBoxes &)=delete
Deleted copy constructor.
TBoxes & Add(const TBoxes< TAllocatorArgs > &boxes)
TBoxes & Add(TBoxables &&... args)
boxing::Box Box
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.