Cogs.Foundation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
Cogs::Collections::SmallVector< T, Size > Class Template Reference

#include <SmallVector.h>

Inheritance diagram for Cogs::Collections::SmallVector< T, Size >:
Cogs::Collections::SmallVectorImpl< T > Cogs::Collections::SmallVectorImplBase< T, std::is_trivially_copyable< T >::value > Cogs::Collections::SmallVectorTemplateBase< T > Cogs::Collections::SmallVectorBase

Classes

struct  SmallVectorStorage
 
struct  SmallVectorStorage< Ts, 0 >
 
struct  SmallVectorStorage< Ts, 1 >
 

Public Types

using value_type = T
 
using difference_type = ptrdiff_t
 
using pointer = const T *
 
using reference = const T &
 

Public Member Functions

 SmallVector ()
 
 SmallVector (size_t size)
 
 SmallVector (Memory::Allocator *allocator)
 
 SmallVector (SmallVector &&other) noexcept
 
 SmallVector (SmallVectorImpl< T > &&other) noexcept
 
 SmallVector (const SmallVector &other)
 
 SmallVector (const SmallVectorImpl< T > &other)
 
 SmallVector (std::initializer_list< T > il)
 
SmallVectoroperator= (const SmallVector &other)
 
SmallVectoroperator= (SmallVector &&other) noexcept
 
SmallVectoroperator= (SmallVectorImpl< T > &&other) noexcept
 
- Public Member Functions inherited from Cogs::Collections::SmallVectorImpl< T >
 ~SmallVectorImpl ()
 
SmallVectorImploperator= (const SmallVectorImpl &other)
 
SmallVectorImploperator= (SmallVectorImpl &&other) noexcept
 
void resize (size_t newSize)
 
void reserve (size_t newCapacity)
 
void clear ()
 
template<typename T1 >
void assign (T1 first, T1 last)
 
void assign (std::initializer_list< T > il)
 
template<typename T1 >
void append (T1 first, T1 last)
 
void append (std::initializer_list< T > il)
 
- Public Member Functions inherited from Cogs::Collections::SmallVectorImplBase< T, std::is_trivially_copyable< T >::value >
void push_back (const T &t)
 
void push_back (T &&t)
 
void emplace_back (Args &&... args)
 
void pop_back ()
 
void erase (const T *pos)
 
- Public Member Functions inherited from Cogs::Collections::SmallVectorTemplateBase< T >
bool empty () const
 
size_t size () const
 
size_t capacity () const
 
Tdata ()
 
const Tdata () const
 
Tbegin ()
 
Tend ()
 
const Tbegin () const
 
const Tend () const
 
const Tcbegin () const
 
const Tcend () const
 
Toperator[] (const size_t index)
 
const Toperator[] (const size_t index) const
 
Tback ()
 
const Tback () const
 
Tfront ()
 
const Tfront () const
 

Private Attributes

SmallVectorStorage< T, Size > inlineStorage
 

Additional Inherited Members

- Protected Member Functions inherited from Cogs::Collections::SmallVectorImpl< T >
 SmallVectorImpl (size_t capacity, Memory::Allocator *allocator=Memory::Allocator::overflowAllocator())
 
void release ()
 
- Protected Member Functions inherited from Cogs::Collections::SmallVectorImplBase< T, std::is_trivially_copyable< T >::value >
 SmallVectorImplBase (size_t capacity, Memory::Allocator *allocator)
 
void grow (size_t minSize=0)
 
void initialize (T *first, const T *last)
 
void destroy (T *first, const T *last)
 
void moveNew (T1 first, T1 last, T2 dest)
 
void move (T1 first, T1 last, T2 dest)
 
void copy (T1 first, T1 last, T2 dest)
 
void copyNew (T1 first, T1 last, T2 dest)
 
- Protected Member Functions inherited from Cogs::Collections::SmallVectorTemplateBase< T >
 SmallVectorTemplateBase (size_t capacity, Memory::Allocator *allocator)
 
bool isSmall () const
 
void setSize (size_t newSize)
 
void reset ()
 
- Protected Member Functions inherited from Cogs::Collections::SmallVectorBase
 SmallVectorBase (void *data, size_t capacity, Memory::Allocator *allocator)
 
void growPod (const void *firstElement, const size_t minSizeBytes)
 
size_t sizeInBytes () const
 
size_t capacityInBytes () const
 
- Protected Attributes inherited from Cogs::Collections::SmallVectorTemplateBase< T >
uint8_t firstElement [sizeof(T)]
 
- Protected Attributes inherited from Cogs::Collections::SmallVectorBase
void * firstPtr
 
void * lastPtr
 
void * capacityPtr
 
Memory::Allocatorallocator
 

Member Typedef Documentation

◆ difference_type

template<typename T , size_t Size>
using Cogs::Collections::SmallVector< T, Size >::difference_type = ptrdiff_t

◆ pointer

template<typename T , size_t Size>
using Cogs::Collections::SmallVector< T, Size >::pointer = const T*

◆ reference

template<typename T , size_t Size>
using Cogs::Collections::SmallVector< T, Size >::reference = const T&

◆ value_type

template<typename T , size_t Size>
using Cogs::Collections::SmallVector< T, Size >::value_type = T

Constructor & Destructor Documentation

◆ SmallVector() [1/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( )
inline

◆ SmallVector() [2/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( size_t  size)
inlineexplicit

◆ SmallVector() [3/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( Memory::Allocator allocator)
inline

◆ SmallVector() [4/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( SmallVector< T, Size > &&  other)
inlinenoexcept

◆ SmallVector() [5/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( SmallVectorImpl< T > &&  other)
inlinenoexcept

◆ SmallVector() [6/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( const SmallVector< T, Size > &  other)
inline

◆ SmallVector() [7/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( const SmallVectorImpl< T > &  other)
inline

◆ SmallVector() [8/8]

template<typename T , size_t Size>
Cogs::Collections::SmallVector< T, Size >::SmallVector ( std::initializer_list< T il)
inline

Member Function Documentation

◆ operator=() [1/3]

template<typename T , size_t Size>
SmallVector & Cogs::Collections::SmallVector< T, Size >::operator= ( const SmallVector< T, Size > &  other)
inline

◆ operator=() [2/3]

template<typename T , size_t Size>
SmallVector & Cogs::Collections::SmallVector< T, Size >::operator= ( SmallVector< T, Size > &&  other)
inlinenoexcept

◆ operator=() [3/3]

template<typename T , size_t Size>
SmallVector & Cogs::Collections::SmallVector< T, Size >::operator= ( SmallVectorImpl< T > &&  other)
inlinenoexcept

Member Data Documentation

◆ inlineStorage

template<typename T , size_t Size>
SmallVectorStorage<T, Size> Cogs::Collections::SmallVector< T, Size >::inlineStorage
private

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