Open3D (C++ API)  0.18.0+c1b55ee
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions
open3d::core::SmallVectorTemplateCommon< T, typename > Class Template Reference

#include <SmallVector.h>

Inheritance diagram for open3d::core::SmallVectorTemplateCommon< T, typename >:
open3d::core::SmallVectorBase< SmallVectorSizeType< T > > open3d::core::SmallVectorTemplateBase< T, bool > open3d::core::SmallVectorTemplateBase< T, true > open3d::core::SmallVectorImpl< T > open3d::core::SmallVector< int64_t, 4 > open3d::core::SmallVector< utility::optional< int64_t >, 4 > open3d::core::SmallVector< T, N > open3d::core::SizeVector open3d::core::DynamicSizeVector

Public Types

using size_type = size_t
 
using difference_type = ptrdiff_t
 
using value_type = T
 
using iterator = T *
 
using const_iterator = const T *
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = const T *
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size_in_bytes () const
 
size_type max_size () const
 
size_t capacity_in_bytes () const
 
pointer data ()
 Return a pointer to the vector's buffer, even if empty(). More...
 
const_pointer data () const
 Return a pointer to the vector's buffer, even if empty(). More...
 
reference operator[] (size_type idx)
 
const_reference operator[] (size_type idx) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
- Public Member Functions inherited from open3d::core::SmallVectorBase< SmallVectorSizeType< T > >
size_t size () const
 
size_t capacity () const
 
LLVM_NODISCARD bool empty () const
 

Protected Member Functions

 SmallVectorTemplateCommon (size_t Size)
 
void grow_pod (size_t MinSize, size_t TSize)
 
bool isSmall () const
 
void resetToSmall ()
 Put this vector in a state of being small. More...
 
bool isReferenceToRange (const void *V, const void *First, const void *Last) const
 Return true if V is an internal reference to the given range. More...
 
bool isReferenceToStorage (const void *V) const
 Return true if V is an internal reference to this vector. More...
 
bool isRangeInStorage (const void *First, const void *Last) const
 
bool isSafeToReferenceAfterResize (const void *Elt, size_t NewSize)
 
void assertSafeToReferenceAfterResize (const void *Elt, size_t NewSize)
 Check whether Elt will be invalidated by resizing the vector to NewSize. More...
 
void assertSafeToAdd (const void *Elt, size_t N=1)
 
void assertSafeToReferenceAfterClear (const T *From, const T *To)
 Check whether any part of the range will be invalidated by clearing. More...
 
template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false>
void assertSafeToReferenceAfterClear (ItTy, ItTy)
 
void assertSafeToAddRange (const T *From, const T *To)
 Check whether any part of the range will be invalidated by growing. More...
 
template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false>
void assertSafeToAddRange (ItTy, ItTy)
 
- Protected Member Functions inherited from open3d::core::SmallVectorBase< SmallVectorSizeType< T > >
 SmallVectorBase ()=delete
 
 SmallVectorBase (void *FirstEl, size_t TotalCapacity)
 
void * mallocForGrow (size_t MinSize, size_t TSize, size_t &NewCapacity)
 
void grow_pod (void *FirstEl, size_t MinSize, size_t TSize)
 
void set_size (size_t N)
 

Static Protected Member Functions

template<class U >
static const T * reserveForParamAndGetAddressImpl (U *This, const T &Elt, size_t N)
 
- Static Protected Member Functions inherited from open3d::core::SmallVectorBase< SmallVectorSizeType< T > >
static constexpr size_t SizeTypeMax ()
 The maximum value of the Size_T used. More...
 

Additional Inherited Members

- Protected Attributes inherited from open3d::core::SmallVectorBase< SmallVectorSizeType< T > >
void * BeginX
 
SmallVectorSizeType< T > Size
 
SmallVectorSizeType< T > Capacity
 

Detailed Description

template<typename T, typename = void>
class open3d::core::SmallVectorTemplateCommon< T, typename >

This is the part of SmallVectorTemplateBase which does not depend on whether the type T is a POD. The extra dummy template argument is used by ArrayRef to avoid unnecessarily requiring T to be complete.

Member Typedef Documentation

◆ const_iterator

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::const_iterator = const T *

◆ const_pointer

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::const_pointer = const T *

◆ const_reference

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::const_reference = const T &

◆ const_reverse_iterator

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::const_reverse_iterator = std::reverse_iterator<const_iterator>

◆ difference_type

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::difference_type = ptrdiff_t

◆ iterator

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::iterator = T *

◆ pointer

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::pointer = T *

◆ reference

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::reference = T &

◆ reverse_iterator

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::reverse_iterator = std::reverse_iterator<iterator>

◆ size_type

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::size_type = size_t

◆ value_type

template<typename T , typename = void>
using open3d::core::SmallVectorTemplateCommon< T, typename >::value_type = T

Constructor & Destructor Documentation

◆ SmallVectorTemplateCommon()

template<typename T , typename = void>
open3d::core::SmallVectorTemplateCommon< T, typename >::SmallVectorTemplateCommon ( size_t  Size)
inlineprotected

Member Function Documentation

◆ assertSafeToAdd()

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAdd ( const void *  Elt,
size_t  N = 1 
)
inlineprotected

Check whether Elt will be invalidated by increasing the size of the vector by N.

◆ assertSafeToAddRange() [1/2]

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAddRange ( const T *  From,
const T *  To 
)
inlineprotected

Check whether any part of the range will be invalidated by growing.

◆ assertSafeToAddRange() [2/2]

template<typename T , typename = void>
template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToAddRange ( ItTy  ,
ItTy   
)
inlineprotected

◆ assertSafeToReferenceAfterClear() [1/2]

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterClear ( const T *  From,
const T *  To 
)
inlineprotected

Check whether any part of the range will be invalidated by clearing.

◆ assertSafeToReferenceAfterClear() [2/2]

template<typename T , typename = void>
template<class ItTy , std::enable_if_t< !std::is_same< std::remove_const_t< ItTy >, T * >::value, bool > = false>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterClear ( ItTy  ,
ItTy   
)
inlineprotected

◆ assertSafeToReferenceAfterResize()

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::assertSafeToReferenceAfterResize ( const void *  Elt,
size_t  NewSize 
)
inlineprotected

Check whether Elt will be invalidated by resizing the vector to NewSize.

◆ back() [1/2]

template<typename T , typename = void>
reference open3d::core::SmallVectorTemplateCommon< T, typename >::back ( )
inline

◆ back() [2/2]

template<typename T , typename = void>
const_reference open3d::core::SmallVectorTemplateCommon< T, typename >::back ( ) const
inline

◆ begin() [1/2]

template<typename T , typename = void>
iterator open3d::core::SmallVectorTemplateCommon< T, typename >::begin ( )
inline

◆ begin() [2/2]

template<typename T , typename = void>
const_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::begin ( ) const
inline

◆ capacity_in_bytes()

template<typename T , typename = void>
size_t open3d::core::SmallVectorTemplateCommon< T, typename >::capacity_in_bytes ( ) const
inline

◆ data() [1/2]

template<typename T , typename = void>
pointer open3d::core::SmallVectorTemplateCommon< T, typename >::data ( )
inline

Return a pointer to the vector's buffer, even if empty().

◆ data() [2/2]

template<typename T , typename = void>
const_pointer open3d::core::SmallVectorTemplateCommon< T, typename >::data ( ) const
inline

Return a pointer to the vector's buffer, even if empty().

◆ end() [1/2]

template<typename T , typename = void>
iterator open3d::core::SmallVectorTemplateCommon< T, typename >::end ( )
inline

◆ end() [2/2]

template<typename T , typename = void>
const_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::end ( ) const
inline

◆ front() [1/2]

template<typename T , typename = void>
reference open3d::core::SmallVectorTemplateCommon< T, typename >::front ( )
inline

◆ front() [2/2]

template<typename T , typename = void>
const_reference open3d::core::SmallVectorTemplateCommon< T, typename >::front ( ) const
inline

◆ grow_pod()

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::grow_pod ( size_t  MinSize,
size_t  TSize 
)
inlineprotected

◆ isRangeInStorage()

template<typename T , typename = void>
bool open3d::core::SmallVectorTemplateCommon< T, typename >::isRangeInStorage ( const void *  First,
const void *  Last 
) const
inlineprotected

Return true if First and Last form a valid (possibly empty) range in this vector's storage.

◆ isReferenceToRange()

template<typename T , typename = void>
bool open3d::core::SmallVectorTemplateCommon< T, typename >::isReferenceToRange ( const void *  V,
const void *  First,
const void *  Last 
) const
inlineprotected

Return true if V is an internal reference to the given range.

◆ isReferenceToStorage()

template<typename T , typename = void>
bool open3d::core::SmallVectorTemplateCommon< T, typename >::isReferenceToStorage ( const void *  V) const
inlineprotected

Return true if V is an internal reference to this vector.

◆ isSafeToReferenceAfterResize()

template<typename T , typename = void>
bool open3d::core::SmallVectorTemplateCommon< T, typename >::isSafeToReferenceAfterResize ( const void *  Elt,
size_t  NewSize 
)
inlineprotected

Return true unless Elt will be invalidated by resizing the vector to NewSize.

◆ isSmall()

template<typename T , typename = void>
bool open3d::core::SmallVectorTemplateCommon< T, typename >::isSmall ( ) const
inlineprotected

Return true if this is a smallvector which has not had dynamic memory allocated for it.

◆ max_size()

template<typename T , typename = void>
size_type open3d::core::SmallVectorTemplateCommon< T, typename >::max_size ( ) const
inline

◆ operator[]() [1/2]

template<typename T , typename = void>
reference open3d::core::SmallVectorTemplateCommon< T, typename >::operator[] ( size_type  idx)
inline

◆ operator[]() [2/2]

template<typename T , typename = void>
const_reference open3d::core::SmallVectorTemplateCommon< T, typename >::operator[] ( size_type  idx) const
inline

◆ rbegin() [1/2]

template<typename T , typename = void>
reverse_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::rbegin ( )
inline

◆ rbegin() [2/2]

template<typename T , typename = void>
const_reverse_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::rbegin ( ) const
inline

◆ rend() [1/2]

template<typename T , typename = void>
reverse_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::rend ( )
inline

◆ rend() [2/2]

template<typename T , typename = void>
const_reverse_iterator open3d::core::SmallVectorTemplateCommon< T, typename >::rend ( ) const
inline

◆ reserveForParamAndGetAddressImpl()

template<typename T , typename = void>
template<class U >
static const T* open3d::core::SmallVectorTemplateCommon< T, typename >::reserveForParamAndGetAddressImpl ( U *  This,
const T &  Elt,
size_t  N 
)
inlinestaticprotected

Reserve enough space to add one element, and return the updated element pointer in case it was a reference to the storage.

◆ resetToSmall()

template<typename T , typename = void>
void open3d::core::SmallVectorTemplateCommon< T, typename >::resetToSmall ( )
inlineprotected

Put this vector in a state of being small.

◆ size_in_bytes()

template<typename T , typename = void>
size_type open3d::core::SmallVectorTemplateCommon< T, typename >::size_in_bytes ( ) const
inline

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