26template<
typename TAllocator>
27class TBoxes :
public std::vector<Box, lang::StdAllocator<Box, TAllocator>>
31 using vectorBase= std::vector<Box, lang::StdAllocator<Box, TAllocator>>;
63 template <
typename... TBoxables>
65 Box boxes[
sizeof...(args)]= { std::forward<TBoxables>( args )... };
86 template<
size_t TExtend>
93 template<
typename TAllocatorArgs>
114 template <
typename TBoxable>
121 template <
typename TBoxable>
131 void Reserve(
integer newCapacity) { vectorBase::reserve(
size_t( newCapacity ) ); }
141 template <
typename TFDecl,
typename... TArgs>
143 for(
auto& box : *
this )
144 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
157 template <
typename TFDecl,
typename... TArgs>
160 for(
auto& box : *
this )
161 box.template Call<TFDecl>( std::forward<TArgs>(args)... );
174 for(
auto& box : *
this )
175 box.Clone( vectorBase::get_allocator().GetAllocator() );
TBoxes & operator<<(TBoxable &&src)
TBoxes & Add(TBoxables &&... args)
void CallAll(TArgs &&... args) const
std::vector< Box, lang::StdAllocator< Box, TAllocator > > vectorBase
The base type.
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)
void AddArray(const Box *boxArray, integer length)
TAllocator AllocatorType
The allocator type that TAllocator specifies.
TBoxes(TBoxes &)=delete
Deleted copy constructor.
void Reserve(integer newCapacity)
TBoxes(TAllocator &pAllocator)
boxing::TBoxes< lang::HeapAllocator > Boxes
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
boxing::TBoxes< PoolAllocator > BoxesPA
Type alias in namespace alib.
boxing::Box Box
Type alias in namespace alib.
boxing::TBoxes< MonoAllocator > BoxesMA
Type alias in namespace alib.