Static Public Member Functions | List of all members
Memory Struct Referencefinal

Utilities for memory. More...

#include <Memory.hpp>

Static Public Member Functions

template<typename T , typename R = T, typename F , typename ... P>
static std::vector< std::shared_ptr< R > > makeShared (F transform, const T &first, const P &... remaining)
 Create a vector of shared pointers after transforming the arguments (scalar transform version). More...
 
template<typename T , typename R = T, typename F >
static std::vector< std::shared_ptr< R > > makeShared (F)
 [End case] Create a vector of shared pointers after transforming the arguments (scalar transform version). More...
 
template<typename T , typename R = T, typename F , typename ... P>
static std::vector< std::shared_ptr< R > > makeSharedV (F transform, const T &first, const P &... remaining)
 Create a vector of shared pointers after transforming the arguments (vector transform version). More...
 
template<typename T , typename R = T, typename F >
static std::vector< std::shared_ptr< R > > makeSharedV (F)
 [End case] Create a vector of shared pointers after transforming the arguments (vector transform version). More...
 
template<typename T , typename R = T, typename F , typename ... P>
static std::vector< std::unique_ptr< R > > makeUnique (F transform, const T &first, const P &... remaining)
 Create a vector of unique pointers after transforming the arguments (scalar transform version). More...
 
template<typename T , typename R = T, typename F >
static std::vector< std::unique_ptr< R > > makeUnique (F)
 [End case] Create a vector of unique pointers after transforming the arguments (scalar transform version). More...
 
template<typename T , typename R = T, typename F , typename ... P>
static std::vector< std::unique_ptr< R > > makeUniqueV (F transform, const T &first, const P &... remaining)
 Create a vector of unique pointers after transforming the arguments (vector transform version). More...
 
template<typename T , typename R = T, typename F >
static std::vector< std::shared_ptr< R > > makeUniqueV (F)
 [End case] Create a vector of unique pointers after transforming the arguments (vector transform version). More...
 

Detailed Description

Utilities for memory.

Member Function Documentation

◆ makeShared() [1/2]

static std::vector<std::shared_ptr<R> > makeShared ( transform,
const T &  first,
const P &...  remaining 
)
inlinestatic

Create a vector of shared pointers after transforming the arguments (scalar transform version).

Given the variadic input reference arguments, create a vector of shared pointers after transforming the arguments via the supplied function.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers
Ptypes of the remaining arguments, compatible with the base type T
Parameters
transformthe transform function called during emplacement
firstthe first argument to emplace
remainingthe remaining arguments to emplace

◆ makeShared() [2/2]

static std::vector<std::shared_ptr<R> > makeShared ( )
inlinestatic

[End case] Create a vector of shared pointers after transforming the arguments (scalar transform version).

Given no variadic input references, create an empty shared pointer vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers

◆ makeSharedV() [1/2]

static std::vector<std::shared_ptr<R> > makeSharedV ( transform,
const T &  first,
const P &...  remaining 
)
inlinestatic

Create a vector of shared pointers after transforming the arguments (vector transform version).

Given the variadic input reference arguments, create a vector of shared pointers after transforming the arguments via the supplied function into a vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers
Ptypes of the remaining arguments, compatible with the base type T
Parameters
transformthe scalar to vector transform function called during emplacement
firstthe first argument to emplace
remainingthe remaining arguments to emplace

◆ makeSharedV() [2/2]

static std::vector<std::shared_ptr<R> > makeSharedV ( )
inlinestatic

[End case] Create a vector of shared pointers after transforming the arguments (vector transform version).

Given no variadic input references, create an empty shared pointer vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers

◆ makeUnique() [1/2]

static std::vector<std::unique_ptr<R> > makeUnique ( transform,
const T &  first,
const P &...  remaining 
)
inlinestatic

Create a vector of unique pointers after transforming the arguments (scalar transform version).

Given the variadic input reference arguments, create a vector of unique pointers after transforming the arguments via the supplied function.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers
Ptypes of the remaining arguments, compatible with the base type T
Parameters
transformthe transform function called during emplacement
firstthe first argument to emplace
remainingthe remaining arguments to emplace

◆ makeUnique() [2/2]

static std::vector<std::unique_ptr<R> > makeUnique ( )
inlinestatic

[End case] Create a vector of unique pointers after transforming the arguments (scalar transform version).

Given no variadic input reference arguments, create an empty unique pointer vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers

◆ makeUniqueV() [1/2]

static std::vector<std::unique_ptr<R> > makeUniqueV ( transform,
const T &  first,
const P &...  remaining 
)
inlinestatic

Create a vector of unique pointers after transforming the arguments (vector transform version).

Given the variadic input reference arguments, create a vector of unique pointers after transforming the arguments via the supplied function into a vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold unique pointers
Ptypes of the remaining arguments, compatible with the base type T
Parameters
transformthe scalar to vector transform function called during emplacement
firstthe first argument to emplace
remainingthe remaining arguments to emplace

◆ makeUniqueV() [2/2]

static std::vector<std::shared_ptr<R> > makeUniqueV ( )
inlinestatic

[End case] Create a vector of unique pointers after transforming the arguments (vector transform version).

Given no variadic input references, create an empty shared pointer vector.

Template Parameters
Tthe common base type of the input arguments
Rthe return type of which the vector will hold shared pointers

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