A vector of objects of type Box. Specializes class std::vector<Box>
(publicly) with a constructor and methods to add a variable number of arbitrary values with one invocation.
If another Boxes object or an array of boxes, or boxed versions of such, are added, this container is "flattened", so that instead of the container, the boxes are added. Such flatting is performed recursively.
TAllocator | The allocator to use with the std::vector , as prototyped with Allocator. |
Public Type Index: | |
using | AllocatorType = TAllocator |
The allocator type that TAllocator specifies. | |
Public Method Index: | |
TBoxes () | |
Defaulted default constructor, usable only with heap allocation. | |
TBoxes (TAllocator &pAllocator) | |
TBoxes (TBoxes &)=delete | |
Deleted copy constructor. | |
TBoxes & | Add () |
TBoxes & | Add (const Box &box) |
template<size_t TExtend> | |
TBoxes & | Add (const Box(&boxArray)[TExtend]) |
template<typename TAllocatorArgs> | |
TBoxes & | Add (const TBoxes< TAllocatorArgs > &boxes) |
template<typename... TBoxables> | |
TBoxes & | Add (TBoxables &&... args) |
void | AddArray (const Box *boxArray, integer length) |
template<typename TFDecl, typename... TArgs> | |
void | CallAll (TArgs &&... args) |
template<typename TFDecl, typename... TArgs> | |
void | CallAll (TArgs &&... args) const |
void | CloneAll () |
template<typename TBoxable> | |
TBoxes & | operator+= (TBoxable &&src) |
template<typename TBoxable> | |
TBoxes & | operator<< (TBoxable &&src) |
TBoxes & | operator= (TBoxes &)=delete |
void | Reserve (integer newCapacity) |
integer | Size () const |
Protected Type Index: | |
using | vectorBase = std::vector<Box, lang::StdContainerAllocator<Box, TAllocator>> |
The allocator type that TAllocator specifies. | |
using alib::boxing::TBoxes< TAllocator >::AllocatorType = TAllocator |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
template ALIB_DLL void alib::boxing::TBoxes< TAllocator >::AddArray | ( | const Box * | boxArray, |
integer | length ) |
Adds an array of boxes. Array elements of types TBoxes itself and boxed arrays of class Box are recursively "flattened".
This method is internally used by all overloads of Add.
boxArray | Pointer to the start of the array of boxes. |
length | The number of boxes contained in boxArray. |
|
inline |
Non-constant version of method CallAll, which likewise chooses the non-constant version of Box::Call and hence this method is usable with functions that only accept mutable (aka not constant) boxes.
Technically, the only difference between this method and CallAll is that the latter is declared const
.
TFDecl | The function type to call. Needs to be specified with invocations of this method. |
TArgs | Types of the variadic arguments args . |
args | Variadic arguments forwarded to the functions. |
|
inline |
Invokes Box::Call with each box in this list. The result of the invocations of the box-functions is ignored.
TFDecl | The function type to call. Needs to be specified with invocations of this method. |
TArgs | Types of the variadic arguments args. Do not need to be specified. |
args | Variadic arguments forwarded to the functions. |
|
inline |
Same as CallAll<FClone>, but uses method Box::Clone, which internally invokes FClone.
Using this version leads to shorter code, because method Box::Clone is not inlined. Cloning is performed 'into' the allocator used by the Boxes instance.
|
inline |
|
inline |
|
delete |
Deleted copy assignment operator.
|
inline |
|
inline |