Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <TUniquePtrVector.h>
Public Member Functions | |
template<typename T > | |
T * | add (std::unique_ptr< T > uniquePtr) |
template<typename T > | |
void | addAll (TUniquePtrVector< T > &uniquePtrs) |
std::unique_ptr< BaseType > | remove (std::size_t index) |
std::unique_ptr< BaseType > | remove (const BaseType *ptr) |
std::unique_ptr< BaseType > | removeLast () |
std::unique_ptr< BaseType > | removeBySwapPop (const BaseType *ptr) |
Remove a unique_ptr . Does not preserve the order of remaining unique_ptr s. Complexity: O(N) where N is size of the vector. Needs to find ptr linearly, but saves the cost of moving every following element forward. | |
void | removeAll () |
void | clear (std::size_t index) |
void | clearRange (std::size_t beginIndex, std::size_t endIndex) |
Set unique_ptr s in the range [beginIndex , endIndex ) to nullptr . | |
BaseType * | get (std::size_t index) const |
BaseType * | first () const |
BaseType * | last () const |
std::unique_ptr< BaseType > & | getUniquePtr (std::size_t index) |
const std::unique_ptr< BaseType > & | getUniquePtr (std::size_t index) const |
std::size_t | size () const |
std::optional< std::size_t > | indexOf (const BaseType *ptr) const |
bool | isEmpty () const |
BaseType * | operator[] (std::size_t index) const |
Iterators | |
Iterators for stored objects. | |
std::vector< std::unique_ptr< BaseType > >::iterator | begin () noexcept |
std::vector< std::unique_ptr< BaseType > >::const_iterator | begin () const noexcept |
std::vector< std::unique_ptr< BaseType > >::iterator | end () noexcept |
std::vector< std::unique_ptr< BaseType > >::const_iterator | end () const noexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
Set unique_ptr
s in the range [beginIndex
, endIndex
) to nullptr
.
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Remove a unique_ptr
. Does not preserve the order of remaining unique_ptr
s. Complexity: O(N) where N is size of the vector. Needs to find ptr
linearly, but saves the cost of moving every following element forward.
|
inline |
|
inline |