PCL
pcl::IndirectArray< T, A > Class Template Reference

Generic dynamic array of pointers to objects. More...

#include <IndirectArray.h>

+ Inheritance diagram for pcl::IndirectArray< T, A >:

Public Types

typedef Allocator< T, A > allocator
 
typedef Array< void *, A > array_implementation
 
typedef array_implementation::iterator array_iterator
 
typedef A block_allocator
 
typedef array_implementation::const_iterator const_array_iterator
 
typedef T *const * const_iterator
 
typedef ReverseRandomAccessIterator< const_iterator, const T * > const_reverse_iterator
 
typedef IndirectEqual< const T * > equal
 
typedef T ** iterator
 
typedef IndirectLess< const T * > less
 
typedef ReverseRandomAccessIterator< iterator, T * > reverse_iterator
 

Public Member Functions

 IndirectArray ()=default
 
 IndirectArray (size_type n)
 
 IndirectArray (size_type n, const T *p)
 
template<class FI >
 IndirectArray (FI i, FI j)
 
 IndirectArray (const IndirectArray &)=default
 
 IndirectArray (IndirectArray &&)=default
 
 ~IndirectArray ()
 
void Add (const IndirectArray &x)
 
void Add (const T *p, size_type n=1)
 
template<class FI >
void Add (FI i, FI j)
 
void Append (const IndirectArray &x)
 
void Append (const T *p, size_type n=1)
 
template<class FI >
void Append (FI p, FI q)
 
template<class F >
void Apply (F f)
 
template<class F >
void Apply (F f) const
 
void Assign (const IndirectArray &x)
 
void Assign (const T *p, size_type n=1)
 
template<class FI >
void Assign (FI i, FI j)
 
iterator At (size_type i)
 
const_iterator At (size_type i) const
 
size_type Available () const
 
iterator Begin ()
 
const_iterator Begin () const
 
iterator begin ()
 
const_iterator begin () const
 
size_type Capacity () const
 
void Clear ()
 
template<class C >
void CloneAssign (const C &x)
 
const_iterator ConstBegin () const
 
const_iterator ConstEnd () const
 
const_reverse_iterator ConstReverseBegin () const
 
const_reverse_iterator ConstReverseEnd () const
 
bool Contains (const T &v) const
 
bool Contains (const T *p) const
 
template<class BP >
bool Contains (const T &v, BP p) const
 
template<class FI >
iterator ContainsSubset (FI i, FI j) const
 
template<class FI , class BP >
iterator ContainsSubset (FI i, FI j, BP p) const
 
template<class C >
iterator ContainsSubset (const C &c) const
 
template<class C , class BP >
iterator ContainsSubset (const C &c, BP p) const
 
size_type Count (const T &v) const
 
size_type Count (const T *p) const
 
template<class BP >
size_type Count (const T &v, BP p) const
 
template<class UP >
size_type CountIf (UP p) const
 
void Delete (iterator i, size_type n=1)
 
void Delete (iterator i, iterator j)
 
void Delete (const T &v)
 
template<class BP >
void Delete (const T &v, BP p)
 
void Delete ()
 
void Destroy (iterator i, size_type n=1)
 
void Destroy (iterator i, iterator j)
 
void Destroy (const T &v)
 
template<class BP >
void Destroy (const T &v, BP p)
 
void Destroy ()
 
iterator End ()
 
const_iterator End () const
 
iterator end ()
 
const_iterator end () const
 
void EnsureUnique ()
 
iterator Expand (size_type n=1)
 
void Fill (const T &v)
 
T * First ()
 
const T * First () const
 
template<class F >
iterator FirstThat (F f) const
 
const allocatorGetAllocator () const
 
iterator Grow (const_iterator i, size_type n=1)
 
uint64 Hash (uint64 seed=0) const
 
uint32 Hash32 (uint32 seed=0) const
 
uint64 Hash64 (uint64 seed=0) const
 
void Import (iterator i, iterator j)
 
iterator Insert (const_iterator i, const IndirectArray &x)
 
iterator Insert (const_iterator i, const T *p, size_type n=1)
 
template<class FI >
iterator Insert (const_iterator i, FI p, FI q)
 
bool IsAliasOf (const IndirectArray &x) const
 
bool IsEmpty () const
 
bool IsUnique () const
 
bool IsValid () const
 
T * Last ()
 
const T * Last () const
 
template<class F >
iterator LastThat (F f) const
 
size_type Length () const
 
size_type LowerBound () const
 
iterator MaxItem () const
 
template<class BP >
iterator MaxItem (BP p) const
 
iterator MinItem () const
 
template<class BP >
iterator MinItem (BP p) const
 
iterator MutableIterator (const_iterator i)
 
T *& operator* ()
 
const T * operator* () const
 
IndirectArrayoperator= (const IndirectArray &x)
 
IndirectArrayoperator= (IndirectArray &&x)
 
T *& operator[] (size_type i)
 
const T * operator[] (size_type i) const
 
void Pack ()
 
void Prepend (const IndirectArray &x)
 
void Prepend (const T *p, size_type n=1)
 
template<class FI >
void Prepend (FI p, FI q)
 
iterator Release ()
 
void Remove (const_iterator i, size_type n=1)
 
void Remove (const_iterator i, const_iterator j)
 
void Remove (const T &v)
 
template<class BP >
void Remove (const T &v, BP p)
 
void Remove (const T *p)
 
iterator Replace (const_iterator i, const_iterator j, const IndirectArray &x)
 
iterator Replace (const_iterator i, const_iterator j, const T *p, size_type n=1)
 
template<class FI >
iterator Replace (const_iterator i, const_iterator j, FI p, FI q)
 
void Reserve (size_type n)
 
void Resize (size_type n)
 
void Reverse ()
 
reverse_iterator ReverseBegin ()
 
const_reverse_iterator ReverseBegin () const
 
reverse_iterator ReverseEnd ()
 
const_reverse_iterator ReverseEnd () const
 
void Rotate (distance_type n)
 
iterator Search (const T &v) const
 
iterator Search (const T *p) const
 
template<class BP >
iterator Search (const T &v, BP p) const
 
iterator SearchLast (const T &v) const
 
iterator SearchLast (const T *p) const
 
template<class BP >
iterator SearchLast (const T &v, BP p) const
 
template<class BI >
iterator SearchLastSubset (BI i, BI j) const
 
template<class BI , class BP >
iterator SearchLastSubset (BI i, BI j, BP p) const
 
template<class C >
iterator SearchLastSubset (const C &c) const
 
template<class C , class BP >
iterator SearchLastSubset (const C &c, BP p) const
 
template<class FI >
iterator SearchSubset (FI i, FI j) const
 
template<class FI , class BP >
iterator SearchSubset (FI i, FI j, BP p) const
 
template<class C >
iterator SearchSubset (const C &c) const
 
template<class C , class BP >
iterator SearchSubset (const C &c, BP p) const
 
void SetAllocator (const allocator &a)
 
void ShiftLeft (const T *p, size_type n=1)
 
void ShiftRight (const T *p, size_type n=1)
 
void Shrink (size_type n=1)
 
size_type Size () const
 
void Sort ()
 
template<class BP >
void Sort (BP p)
 
void Squeeze ()
 
template<class S >
S & ToCommaSeparated (S &s) const
 
template<class S >
S & ToNewLineSeparated (S &s) const
 
template<class S , typename SP >
S & ToSeparated (S &s, SP separator) const
 
template<class S , typename SP , class AF >
S & ToSeparated (S &s, SP separator, AF append) const
 
template<class S >
S & ToSpaceSeparated (S &s) const
 
template<class S >
S & ToTabSeparated (S &s) const
 
void Transfer (IndirectArray &x)
 
void Transfer (IndirectArray &&x)
 
void Truncate (const_iterator i)
 
void UniquifyIterator (iterator &i)
 
void UniquifyIterators (iterator &i, iterator &j)
 
size_type UpperBound () const
 

Friends

void Swap (IndirectArray &x1, IndirectArray &x2)
 

Detailed Description

template<class T, class A = StandardAllocator>
class pcl::IndirectArray< T, A >

IndirectArray is a generic, finite ordered sequence of pointers to objects, implemented as a reference-counted, dynamic array of pointers to T instances. The type A provides dynamic allocation for contiguous sequences of void* (StandardAllocator is used by default).

In the PixInsight/PCL platform, dynamic arrays of pointers to objects are powerful building blocks for the implementation of flexible data structures, including heterogeneous containers.

Unlike ReferenceArray, IndirectArray can contain null pointers because it does not require dereferencing pointers. Actually, IndirectArray by itself does not need to know anything about the objects pointed to by its contained pointers, and precisely here lies its flexibility as a generic container.

See also
IndirectSortedArray, ReferenceArray, ReferenceSortedArray, Array, SortedArray, ReferenceCounter

Definition at line 91 of file IndirectArray.h.

Member Typedef Documentation

◆ allocator

template<class T, class A = StandardAllocator>
typedef Allocator<T,A> pcl::IndirectArray< T, A >::allocator

#

Definition at line 101 of file IndirectArray.h.

◆ array_implementation

template<class T, class A = StandardAllocator>
typedef Array<void*, A> pcl::IndirectArray< T, A >::array_implementation

#

Definition at line 113 of file IndirectArray.h.

◆ array_iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::iterator pcl::IndirectArray< T, A >::array_iterator

#

Definition at line 118 of file IndirectArray.h.

◆ block_allocator

template<class T, class A = StandardAllocator>
typedef A pcl::IndirectArray< T, A >::block_allocator

#

Definition at line 97 of file IndirectArray.h.

◆ const_array_iterator

template<class T, class A = StandardAllocator>
typedef array_implementation::const_iterator pcl::IndirectArray< T, A >::const_array_iterator

#

Definition at line 123 of file IndirectArray.h.

◆ const_iterator

template<class T, class A = StandardAllocator>
typedef T* const* pcl::IndirectArray< T, A >::const_iterator

#

Definition at line 109 of file IndirectArray.h.

◆ const_reverse_iterator

template<class T, class A = StandardAllocator>
typedef ReverseRandomAccessIterator<const_iterator, const T*> pcl::IndirectArray< T, A >::const_reverse_iterator

#

Definition at line 133 of file IndirectArray.h.

◆ equal

template<class T, class A = StandardAllocator>
typedef IndirectEqual<const T*> pcl::IndirectArray< T, A >::equal

#

Definition at line 137 of file IndirectArray.h.

◆ iterator

template<class T, class A = StandardAllocator>
typedef T** pcl::IndirectArray< T, A >::iterator

#

Definition at line 105 of file IndirectArray.h.

◆ less

template<class T, class A = StandardAllocator>
typedef IndirectLess<const T*> pcl::IndirectArray< T, A >::less

#

Definition at line 141 of file IndirectArray.h.

◆ reverse_iterator

template<class T, class A = StandardAllocator>
typedef ReverseRandomAccessIterator<iterator, T*> pcl::IndirectArray< T, A >::reverse_iterator

#

Definition at line 128 of file IndirectArray.h.

Constructor & Destructor Documentation

◆ IndirectArray() [1/6]

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::IndirectArray ( )
default

Constructs an empty indirect array.

◆ IndirectArray() [2/6]

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::IndirectArray ( size_type  n)
inlineexplicit

Constructs an indirect array of length n. All contained pointers are initialized to nullptr.

Definition at line 155 of file IndirectArray.h.

◆ IndirectArray() [3/6]

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::IndirectArray ( size_type  n,
const T *  p 
)
inline

Constructs an indirect array that stores n copies of a pointer p.

Definition at line 163 of file IndirectArray.h.

◆ IndirectArray() [4/6]

template<class T, class A = StandardAllocator>
template<class FI >
pcl::IndirectArray< T, A >::IndirectArray ( FI  i,
FI  j 
)
inline

Constructs an indirect array as a copy of the sequence of pointers defined by the range [i,j) of forward iterators.

Definition at line 173 of file IndirectArray.h.

◆ IndirectArray() [5/6]

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::IndirectArray ( const IndirectArray< T, A > &  )
default

Copy constructor.

◆ IndirectArray() [6/6]

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::IndirectArray ( IndirectArray< T, A > &&  )
default

Move constructor.

◆ ~IndirectArray()

template<class T, class A = StandardAllocator>
pcl::IndirectArray< T, A >::~IndirectArray ( )
inline

Destroys an IndirectArray object.

Deallocates the internal array of pointers to objects, but does not destroy the pointed objects. To destroy them, you have to call Destroy() or Delete() explicitly.

Definition at line 195 of file IndirectArray.h.

Member Function Documentation

◆ Add() [1/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Add ( const IndirectArray< T, A > &  x)
inline

A synonym for Append( const IndirectArray<>& )

Definition at line 928 of file IndirectArray.h.

◆ Add() [2/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Add ( const T *  p,
size_type  n = 1 
)
inline

A synonym for Append( const T*, size_type )

Definition at line 936 of file IndirectArray.h.

◆ Add() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::IndirectArray< T, A >::Add ( FI  i,
FI  j 
)
inline

A synonym for Append( FI, FI )

Definition at line 945 of file IndirectArray.h.

◆ Append() [1/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Append ( const IndirectArray< T, A > &  x)
inline

Appends a copy of the sequence of pointers contained by the indirect array x to this indirect array.

Definition at line 869 of file IndirectArray.h.

Referenced by pcl::operator<<(), and pcl::ReferenceArray< XMLNode >::Replace().

◆ Append() [2/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Append ( const T *  p,
size_type  n = 1 
)
inline

Appends a contiguous sequence of n pointers equal to p to this indirect array.

Definition at line 878 of file IndirectArray.h.

◆ Append() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::IndirectArray< T, A >::Append ( FI  p,
FI  q 
)
inline

Appends a copy of the sequence of pointers defined by the range [p,q) of forward iterators to this indirect array.

Note
p and q must not be iterators into this array.

Definition at line 890 of file IndirectArray.h.

◆ Apply() [1/2]

template<class T, class A = StandardAllocator>
template<class F >
void pcl::IndirectArray< T, A >::Apply ( f)
inline

Calls f( T& x ) for every object x pointed to by non-null pointers in this array, successively from the first contained pointer to the last.

Definition at line 1385 of file IndirectArray.h.

◆ Apply() [2/2]

template<class T, class A = StandardAllocator>
template<class F >
void pcl::IndirectArray< T, A >::Apply ( f) const
inline

Calls f( const T& x ) for every object x pointed to by non-null pointers in this array, successively from the first contained pointer to the last.

Definition at line 1395 of file IndirectArray.h.

◆ Assign() [1/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Assign ( const IndirectArray< T, A > &  x)
inline

Assigns an indirect array x to this indirect array.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Increments the reference counter of the source array's data and references it in this array.

Definition at line 635 of file IndirectArray.h.

◆ Assign() [2/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Assign ( const T *  p,
size_type  n = 1 
)
inline

Replaces the contents of this indirect array with a sequence of n pointers equal to p.

Definition at line 681 of file IndirectArray.h.

◆ Assign() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::IndirectArray< T, A >::Assign ( FI  i,
FI  j 
)
inline

Replaces the contents of this indirect array with a copy of the sequence of pointers defined by the range [i,j) of forward iterators.

Note
i and j must not be iterators into this array.

Definition at line 693 of file IndirectArray.h.

◆ At() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::At ( size_type  i)
inline

Returns an array iterator located at the specified index i.

Definition at line 337 of file IndirectArray.h.

◆ At() [2/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::At ( size_type  i) const
inline

Returns an immutable array iterator located at the specified index i.

Definition at line 345 of file IndirectArray.h.

◆ Available()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Available ( ) const
inline

Returns the length of the space available in this indirect array, or zero if this indirect array cannot contain more pointers. The available space is the number of pointers to objects that can be added to this indirect array without requiring a reallocation. It is equal to Capacity() - Length() by definition.

Definition at line 267 of file IndirectArray.h.

◆ Begin() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Begin ( )
inline

Returns a mutable iterator located at the beginning of this array.

Definition at line 403 of file IndirectArray.h.

Referenced by pcl::IndirectSortedArray< T, A >::Add(), and pcl::operator==().

◆ Begin() [2/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::Begin ( ) const
inline

Returns an immutable iterator located at the beginning of this array.

Definition at line 411 of file IndirectArray.h.

◆ begin() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::begin ( )
inline

STL-compatible iteration. Equivalent to Begin().

Definition at line 584 of file IndirectArray.h.

◆ begin() [2/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::begin ( ) const
inline

STL-compatible iteration. Equivalent to Begin() const.

Definition at line 592 of file IndirectArray.h.

◆ Capacity()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Capacity ( ) const
inline

Returns the capacity of this indirect array. The capacity is the maximum number of pointers to objects that this indirect array can contain without requiring a reallocation.

Definition at line 255 of file IndirectArray.h.

◆ Clear()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Clear ( )
inline

Removes all pointers contained by this object, yielding an empty indirect array.

If this array is empty, then calling this member function has no effect.

If this array uniquely references its internal array data structure, all pointers contained are deallocated; otherwise its reference counter is decremented. Then a new, empty array data structure is created and uniquely referenced.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 1063 of file IndirectArray.h.

◆ CloneAssign()

template<class T, class A = StandardAllocator>
template<class C >
void pcl::IndirectArray< T, A >::CloneAssign ( const C &  x)
inline

Replaces the contents of this indirect array with a set of pointers to newly created copies of the objects stored in the specified container x. This function works for both direct and indirect containers.

Keep in mind that after calling this function (with a reference to a nonempty container) this array will store pointers to newly allocated objects. You should call Delete() or Destroy() to deallocate these objects before destructing this array, or copy the pointers somewhere, in order to avoid memory leaks.

Definition at line 710 of file IndirectArray.h.

◆ ConstBegin()

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::ConstBegin ( ) const
inline

Returns an immutable iterator located at the beginning of this array.

Definition at line 419 of file IndirectArray.h.

◆ ConstEnd()

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::ConstEnd ( ) const
inline

Returns an immutable iterator located at the end of this array.

Definition at line 443 of file IndirectArray.h.

◆ ConstReverseBegin()

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::IndirectArray< T, A >::ConstReverseBegin ( ) const
inline

Returns an immutable reverse iterator located at the reverse beginning of this indirect array.

The reverse beginning corresponds to the last pointer in the array.

Definition at line 476 of file IndirectArray.h.

◆ ConstReverseEnd()

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::IndirectArray< T, A >::ConstReverseEnd ( ) const
inline

Returns an immutable reverse iterator located at the reverse end of this indirect array.

The reverse end corresponds to a (nonexistent) pointer immediately before the first pointer in the array.

Definition at line 512 of file IndirectArray.h.

◆ Contains() [1/3]

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::Contains ( const T &  v) const
inline

#

Definition at line 1638 of file IndirectArray.h.

◆ Contains() [2/3]

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::Contains ( const T *  p) const
inline

#

Definition at line 1645 of file IndirectArray.h.

◆ Contains() [3/3]

template<class T, class A = StandardAllocator>
template<class BP >
bool pcl::IndirectArray< T, A >::Contains ( const T &  v,
BP  p 
) const
inline

#

Definition at line 1653 of file IndirectArray.h.

◆ ContainsSubset() [1/4]

template<class T, class A = StandardAllocator>
template<class FI >
iterator pcl::IndirectArray< T, A >::ContainsSubset ( FI  i,
FI  j 
) const
inline

#

Definition at line 1661 of file IndirectArray.h.

◆ ContainsSubset() [2/4]

template<class T, class A = StandardAllocator>
template<class FI , class BP >
iterator pcl::IndirectArray< T, A >::ContainsSubset ( FI  i,
FI  j,
BP  p 
) const
inline

#

Definition at line 1669 of file IndirectArray.h.

◆ ContainsSubset() [3/4]

template<class T, class A = StandardAllocator>
template<class C >
iterator pcl::IndirectArray< T, A >::ContainsSubset ( const C &  c) const
inline

#

Definition at line 1677 of file IndirectArray.h.

◆ ContainsSubset() [4/4]

template<class T, class A = StandardAllocator>
template<class C , class BP >
iterator pcl::IndirectArray< T, A >::ContainsSubset ( const C &  c,
BP  p 
) const
inline

#

Definition at line 1685 of file IndirectArray.h.

◆ Count() [1/3]

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Count ( const T &  v) const
inline

Returns the number of objects equal to v pointed to by non-null pointers stored in this indirect array.

Definition at line 1426 of file IndirectArray.h.

◆ Count() [2/3]

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Count ( const T *  p) const
inline

Returns the number of pointers equal to p stored in this indirect array.

Definition at line 1435 of file IndirectArray.h.

◆ Count() [3/3]

template<class T, class A = StandardAllocator>
template<class BP >
size_type pcl::IndirectArray< T, A >::Count ( const T &  v,
BP  p 
) const
inline

Returns the number of objects pointed to by non-null pointers stored in this indirect array such that for each counted pointer x the binary predicate p( *x, v ) returns true.

Definition at line 1446 of file IndirectArray.h.

◆ CountIf()

template<class T, class A = StandardAllocator>
template<class UP >
size_type pcl::IndirectArray< T, A >::CountIf ( UP  p) const
inline

Returns the number of objects pointed to by non-null pointers stored in this indirect array such that for each counted pointer x the unary predicate p( *x ) returns true.

Definition at line 1457 of file IndirectArray.h.

◆ Delete() [1/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Delete ( iterator  i,
size_type  n = 1 
)
inline

Destroys a sequence of n contiguous pointed objects, starting at the specified location i in this indirect array. Null pointers are ignored.

This function destroys and deallocates the pointed objects, then replaces the corresponding pointers by nullptr in this array. The array length is not modified.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1080 of file IndirectArray.h.

◆ Delete() [2/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Delete ( iterator  i,
iterator  j 
)
inline

Destroys the objects pointed to by a range [i,j) of pointers in this indirect array. Null pointers are ignored.

This function destroys and deallocates the pointed objects, then replaces the corresponding pointers by nullptr in this array. The array length is not modified.

Warning
This function can be useful but is potentially dangerous. If the array contains duplicate non-null pointers in the specified range of iterators, this function will lead to a crash as a result of multiple deletions. To minimize the risk of multiple deletions, this function ignores the normal data sharing mechanism so that all objects sharing the same array data structure will correctly 'see' the deleted pointers as null pointers. However, be aware of potential problems if other indirect containers store pointers to deleted objects in different data structures, which will be invalid after calling this function.

Definition at line 1103 of file IndirectArray.h.

◆ Delete() [3/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Delete ( const T &  v)
inline

Destroys all objects equal to v pointed to by non-null pointers contained by this array.

This function destroys and deallocates the pointed objects, then replaces the corresponding pointers by nullptr in this array. The array length is not modified.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1128 of file IndirectArray.h.

◆ Delete() [4/5]

template<class T, class A = StandardAllocator>
template<class BP >
void pcl::IndirectArray< T, A >::Delete ( const T &  v,
BP  p 
)
inline

Destroys every object pointed to by a pointer x in this array such that the binary predicate p( *x, v ) is true.

This function destroys and deallocates the pointed objects, then replaces the corresponding pointers by nullptr in this array. The array length is not modified.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1149 of file IndirectArray.h.

◆ Delete() [5/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Delete ( )
inline

Destroys all objects pointed to by non-null pointers in this indirect array. All pointers contained are set equal to nullptr, and the array length is not modified.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1166 of file IndirectArray.h.

◆ Destroy() [1/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Destroy ( iterator  i,
size_type  n = 1 
)
inline

Destroys and removes a sequence of n contiguous pointed objects, starting at the specified location i in this indirect array. Null pointers are ignored.

This function destroys and deallocates the pointed objects, then removes the corresponding pointers in this array. The array length is decreased by the number of destroyed objects.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1187 of file IndirectArray.h.

◆ Destroy() [2/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Destroy ( iterator  i,
iterator  j 
)
inline

Destroys and removes the objects pointed to by a range [i,j) of pointers in this indirect array. Null pointers are ignored.

This function destroys and deallocates the pointed objects, then removes the corresponding pointers in this array. The array length is decreased by the number of destroyed objects.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1204 of file IndirectArray.h.

◆ Destroy() [3/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Destroy ( const T &  v)
inline

Destroys and removes all objects equal to v pointed to by non-null pointers contained by this array.

This function destroys and deallocates the pointed objects, then removes the corresponding pointers in this array. The array length is decreased by the number of destroyed objects.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1221 of file IndirectArray.h.

◆ Destroy() [4/5]

template<class T, class A = StandardAllocator>
template<class BP >
void pcl::IndirectArray< T, A >::Destroy ( const T &  v,
BP  p 
)
inline

Destroys and removes every object pointed to by a pointer x in this array such that the binary predicate p( *x, v ) is true.

This function destroys and deallocates the pointed objects, then removes the corresponding pointers in this array. The array length is decreased by the number of destroyed objects.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1247 of file IndirectArray.h.

◆ Destroy() [5/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Destroy ( )
inline

Destroys all objects pointed to by non-null pointers in this indirect array, and removes all pointers, yielding an empty array.

Warning
See Delete( iterator, iterator ) for critical information on this member function.

Definition at line 1268 of file IndirectArray.h.

◆ End() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::End ( )
inline

Returns a mutable iterator located at the end of this array.

Definition at line 427 of file IndirectArray.h.

Referenced by pcl::IndirectSortedArray< T, A >::Add(), and pcl::operator==().

◆ End() [2/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::End ( ) const
inline

Returns an immutable iterator located at the end of this array.

Definition at line 435 of file IndirectArray.h.

◆ end() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::end ( )
inline

STL-compatible iteration. Equivalent to End().

Definition at line 600 of file IndirectArray.h.

◆ end() [2/2]

template<class T, class A = StandardAllocator>
const_iterator pcl::IndirectArray< T, A >::end ( ) const
inline

STL-compatible iteration. Equivalent to End() const.

Definition at line 608 of file IndirectArray.h.

◆ EnsureUnique()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::EnsureUnique ( )
inline

Ensures that this indirect array uniquely references its contained data pointers.

If necessary, this member function generates a duplicate of the array of pointers, references it, and then decrements the reference counter of the original pointer array.

Definition at line 228 of file IndirectArray.h.

◆ Expand()

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Expand ( size_type  n = 1)
inline

Appends a contiguous sequence of n null pointers to this indirect array. This operation is equivalent to:

Grow( End(), n )

Returns an iterator pointing to the first newly created array element, or End() if n is zero.

Definition at line 767 of file IndirectArray.h.

◆ Fill()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Fill ( const T &  v)
inline

Sets all objects contained by this array equal to v.

Definition at line 1375 of file IndirectArray.h.

◆ First() [1/2]

template<class T, class A = StandardAllocator>
T* pcl::IndirectArray< T, A >::First ( )
inline

Returns a copy of the first pointer in this indirect array, or nullptr if this array is empty.

Definition at line 521 of file IndirectArray.h.

◆ First() [2/2]

template<class T, class A = StandardAllocator>
const T* pcl::IndirectArray< T, A >::First ( ) const
inline

Returns a copy of the first pointer to an unmodifiable object in this indirect array, or nullptr if this array is empty.

Definition at line 530 of file IndirectArray.h.

◆ FirstThat()

template<class T, class A = StandardAllocator>
template<class F >
iterator pcl::IndirectArray< T, A >::FirstThat ( f) const
inline

Returns an iterator pointing to the first non-null pointer in this array that points to an object x such that f( const T& x ) is true. Returns End() if such pointer does not exist.

Definition at line 1406 of file IndirectArray.h.

◆ GetAllocator()

template<class T, class A = StandardAllocator>
const allocator& pcl::IndirectArray< T, A >::GetAllocator ( ) const
inline

Returns a reference to the allocator object used by this indirect array.

Definition at line 321 of file IndirectArray.h.

◆ Grow()

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Grow ( const_iterator  i,
size_type  n = 1 
)
inline

Inserts a contiguous sequence of n null pointers at the specified location i in this indirect array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first newly created array element, or i if n is zero.

Definition at line 753 of file IndirectArray.h.

◆ Hash()

template<class T, class A = StandardAllocator>
uint64 pcl::IndirectArray< T, A >::Hash ( uint64  seed = 0) const
inline

Returns a non-cryptographic hash value computed for this indirect array. This function is a synonym for Hash64().

Definition at line 1888 of file IndirectArray.h.

◆ Hash32()

template<class T, class A = StandardAllocator>
uint32 pcl::IndirectArray< T, A >::Hash32 ( uint32  seed = 0) const
inline

Returns a 32-bit non-cryptographic hash value computed for this indirect array.

This function calls pcl::Hash32() for the internal array of pointers, not for the pointed objects.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

Definition at line 1879 of file IndirectArray.h.

◆ Hash64()

template<class T, class A = StandardAllocator>
uint64 pcl::IndirectArray< T, A >::Hash64 ( uint64  seed = 0) const
inline

Returns a 64-bit non-cryptographic hash value computed for this indirect array.

This function calls pcl::Hash64() for the internal array of pointers, not for the pointed objects.

The seed parameter can be used to generate repeatable hash values. It can also be set to a random value in compromised environments.

Definition at line 1864 of file IndirectArray.h.

◆ Import()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Import ( iterator  i,
iterator  j 
)
inline

Causes this indirect array to store the sequence of pointers defined by the range [i,j) of indirect array iterators (pointers to pointers). The previously referenced data structure is dereferenced and deallocated if it becomes unreferenced.

Definition at line 722 of file IndirectArray.h.

◆ Insert() [1/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Insert ( const_iterator  i,
const IndirectArray< T, A > &  x 
)
inline

Inserts a copy of the sequence of pointers contained by the indirect array x at the specified location i in this indirect array.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements. The source array x can safely be a reference to this array.

Returns an iterator pointing to the first newly created array element, or i if x is empty.

Definition at line 827 of file IndirectArray.h.

◆ Insert() [2/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Insert ( const_iterator  i,
const T *  p,
size_type  n = 1 
)
inline

Inserts a contiguous sequence of n pointers equal to p at the specified location i.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first inserted array element, or i if n is zero.

Definition at line 842 of file IndirectArray.h.

◆ Insert() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
iterator pcl::IndirectArray< T, A >::Insert ( const_iterator  i,
FI  p,
FI  q 
)
inline

Inserts a copy of the sequence of pointers defined by the range [p,q) of forward iterators at the specified location i.

The insertion point i is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first inserted array element, or i if q <= p.

Note
p and q must not be iterators into this array.

Definition at line 860 of file IndirectArray.h.

◆ IsAliasOf()

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::IsAliasOf ( const IndirectArray< T, A > &  x) const
inline

Returns true iff this indirect array is an alias of the indirect array x.

Two objects are aliases if both share the same data. Two indirect containers are aliases if they share a unique set of data pointers.

Definition at line 215 of file IndirectArray.h.

◆ IsEmpty()

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::IsEmpty ( ) const
inline

Returns true iff this indirect array is empty.

Definition at line 295 of file IndirectArray.h.

◆ IsUnique()

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::IsUnique ( ) const
inline

Returns true iff this indirect array uniquely references its contained array of pointers to objects.

Definition at line 203 of file IndirectArray.h.

◆ IsValid()

template<class T, class A = StandardAllocator>
bool pcl::IndirectArray< T, A >::IsValid ( ) const
inline

Returns true only if this indirect array is valid. An indirect array is valid if it references an internal structure with an array of pointers, even if it is an empty array.

In general, all IndirectArray objects are valid with only two exceptions:

  • Objects that have been move-copied or move-assigned to other arrays.
  • Objects that have been invalidated explicitly by calling Transfer().

An invalid array object cannot be used and should be destroyed immediately. Invalid arrays are always destroyed automatically during move construction and move assignment operations.

Definition at line 287 of file IndirectArray.h.

◆ Last() [1/2]

template<class T, class A = StandardAllocator>
T* pcl::IndirectArray< T, A >::Last ( )
inline

Returns a copy of the last pointer in this indirect array, or nullptr if this array is empty.

Definition at line 539 of file IndirectArray.h.

◆ Last() [2/2]

template<class T, class A = StandardAllocator>
const T* pcl::IndirectArray< T, A >::Last ( ) const
inline

Returns a copy of the last pointer to an unmodifiable object in this indirect array, or nullptr if this array is empty.

Definition at line 548 of file IndirectArray.h.

◆ LastThat()

template<class T, class A = StandardAllocator>
template<class F >
iterator pcl::IndirectArray< T, A >::LastThat ( f) const
inline

Returns an iterator pointing to the last non-null pointer in this array that points to an object x such that f( const T& x ) is true. Returns End() if such pointer does not exist.

Definition at line 1417 of file IndirectArray.h.

◆ Length()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Length ( ) const
inline

Returns the length of this indirect array.

Definition at line 245 of file IndirectArray.h.

Referenced by pcl::operator==().

◆ LowerBound()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::LowerBound ( ) const
inline

Returns the minimum legal index in this array (always zero). For empty arrays, this function returns a meaningless value.

Definition at line 304 of file IndirectArray.h.

◆ MaxItem() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::MaxItem ( ) const
inline

#

Definition at line 1480 of file IndirectArray.h.

◆ MaxItem() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
iterator pcl::IndirectArray< T, A >::MaxItem ( BP  p) const
inline

#

Definition at line 1488 of file IndirectArray.h.

◆ MinItem() [1/2]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::MinItem ( ) const
inline

#

Definition at line 1464 of file IndirectArray.h.

◆ MinItem() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
iterator pcl::IndirectArray< T, A >::MinItem ( BP  p) const
inline

#

Definition at line 1472 of file IndirectArray.h.

◆ MutableIterator()

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::MutableIterator ( const_iterator  i)
inline

Returns a mutable iterator pointing to the same array element as the specified immutable iterator i.

Warning
As a side-effect of calling this function, the specified immutable iterator i may become invalid. This happens when this function is called for a shared array, since in this case getting a mutable iterator involves a deep copy of the array through an implicit call to EnsureUnique().

Definition at line 360 of file IndirectArray.h.

◆ operator*() [1/2]

template<class T, class A = StandardAllocator>
T*& pcl::IndirectArray< T, A >::operator* ( )
inline

Returns a reference to the first pointer stored in this indirect array.

Definition at line 386 of file IndirectArray.h.

◆ operator*() [2/2]

template<class T, class A = StandardAllocator>
const T* pcl::IndirectArray< T, A >::operator* ( ) const
inline

Returns a copy of the first pointer to an unmodifiable object stored in this indirect array.

Definition at line 395 of file IndirectArray.h.

◆ operator=() [1/2]

template<class T, class A = StandardAllocator>
IndirectArray& pcl::IndirectArray< T, A >::operator= ( const IndirectArray< T, A > &  x)
inline

Copy assignment operator.

Causes this indirect array to reference the same set of pointers as another array x. Returns a reference to this object.

Definition at line 620 of file IndirectArray.h.

◆ operator=() [2/2]

template<class T, class A = StandardAllocator>
IndirectArray& pcl::IndirectArray< T, A >::operator= ( IndirectArray< T, A > &&  x)
inline

Move assignment operator. Returns a reference to this object.

Definition at line 643 of file IndirectArray.h.

◆ operator[]() [1/2]

template<class T, class A = StandardAllocator>
T*& pcl::IndirectArray< T, A >::operator[] ( size_type  i)
inline

Returns a reference to the pointer stored at the specified index i. No bounds checking is performed.

Definition at line 369 of file IndirectArray.h.

◆ operator[]() [2/2]

template<class T, class A = StandardAllocator>
const T* pcl::IndirectArray< T, A >::operator[] ( size_type  i) const
inline

Returns a copy of the pointer to an unmodifiable object stored at the specified index i. No bounds checking is performed.

Definition at line 378 of file IndirectArray.h.

◆ Pack()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Pack ( )
inline

Removes all null pointers from this array.

Definition at line 1277 of file IndirectArray.h.

◆ Prepend() [1/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Prepend ( const IndirectArray< T, A > &  x)
inline

Inserts a copy of the sequence of pointers contained by the indirect array x at the beginning of this indirect array.

Definition at line 899 of file IndirectArray.h.

◆ Prepend() [2/3]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Prepend ( const T *  p,
size_type  n = 1 
)
inline

Inserts a contiguous sequence of n pointers equal to p at the beginning of this indirect array.

Definition at line 908 of file IndirectArray.h.

◆ Prepend() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
void pcl::IndirectArray< T, A >::Prepend ( FI  p,
FI  q 
)
inline

Inserts a copy of the sequence of pointers defined by the range [p,q) of forward iterators at the beginning of this indirect array.

Note
p and q must not be iterators into this array.

Definition at line 920 of file IndirectArray.h.

◆ Release()

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Release ( )
inline

Releases the set of pointers contained by this indirect array.

This member function returns a pointer to the internal block of pointers stored in this object, after ensuring that it is uniquely referenced. If the array is empty, this function may return the null pointer.

Before returning, this member function empties this array without deallocating its contained data. The caller is then responsible for deallocating the returned block when it is no longer required.

Definition at line 738 of file IndirectArray.h.

◆ Remove() [1/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Remove ( const_iterator  i,
size_type  n = 1 
)
inline

Removes a sequence of n contiguous pointers starting at the specified location i in this indirect array.

If the starting iterator i is located at or after the end of this array, or if n is zero, this function does nothing. Otherwise i is constrained to stay in the range [Begin(),End()) of existing array elements.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 962 of file IndirectArray.h.

◆ Remove() [2/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Remove ( const_iterator  i,
const_iterator  j 
)
inline

Removes a sequence of contiguous pointers in the range [i,j) of this indirect array.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 979 of file IndirectArray.h.

◆ Remove() [3/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Remove ( const T &  v)
inline

Removes all existing non-null pointers whose pointed objects are equal to the specified value v in this indirect array.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 1010 of file IndirectArray.h.

◆ Remove() [4/5]

template<class T, class A = StandardAllocator>
template<class BP >
void pcl::IndirectArray< T, A >::Remove ( const T &  v,
BP  p 
)
inline

Removes every non-null pointer x in this array such that the binary predicate p( *x, v ) is true.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 1028 of file IndirectArray.h.

◆ Remove() [5/5]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Remove ( const T *  p)
inline

Removes all contained pointers equal to p in this indirect array.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 1044 of file IndirectArray.h.

◆ Replace() [1/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Replace ( const_iterator  i,
const_iterator  j,
const IndirectArray< T, A > &  x 
)
inline

Replaces a sequence of contiguous pointers defined by the range [i,j) of iterators in this array by the pointers stored in an indirect array x.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Definition at line 1295 of file IndirectArray.h.

◆ Replace() [2/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Replace ( const_iterator  i,
const_iterator  j,
const T *  p,
size_type  n = 1 
)
inline

Replaces a sequence of contiguous pointers defined by the range [i,j) in this indirect array by n copies of the specified pointer p.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Definition at line 1314 of file IndirectArray.h.

◆ Replace() [3/3]

template<class T, class A = StandardAllocator>
template<class FI >
iterator pcl::IndirectArray< T, A >::Replace ( const_iterator  i,
const_iterator  j,
FI  p,
FI  q 
)
inline

Replaces a sequence of contiguous pointers defined by the range [i,j) in this indirect array by the sequence of pointers in the range [p,q) of forward iterators.

If the starting iterator i is located at or after the end of this array, or if j precedes i, this function does nothing. Otherwise the range [i,j) is constrained to stay in the range [Begin(),End()) of existing array elements.

Returns an iterator pointing to the first replaced array element, i if no elements are replaced, or nullptr if the resulting array is empty.

Note
p and q must not be iterators into this array.

Definition at line 1337 of file IndirectArray.h.

◆ Reserve()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Reserve ( size_type  n)
inline

Ensures that this indirect array has enough capacity to store n pointers.

After calling this member function with n > 0, this object is guaranteed to uniquely reference its pointer array data.

Definition at line 1350 of file IndirectArray.h.

◆ Resize()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Resize ( size_type  n)
inline

Resizes this indirect array to the specified length n, either by appending null pointers, or by removing existing trailing pointers. This operation is equivalent to:

if ( n > Length() )
Expand( n - Length() );
else
Shrink( Length() - n );

When the array length is reduced, only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 807 of file IndirectArray.h.

◆ Reverse()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Reverse ( )
inline

#

Definition at line 1496 of file IndirectArray.h.

◆ ReverseBegin() [1/2]

template<class T, class A = StandardAllocator>
reverse_iterator pcl::IndirectArray< T, A >::ReverseBegin ( )
inline

Returns a mutable reverse iterator located at the reverse beginning of this indirect array.

The reverse beginning corresponds to the last pointer in the array.

Definition at line 454 of file IndirectArray.h.

◆ ReverseBegin() [2/2]

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::IndirectArray< T, A >::ReverseBegin ( ) const
inline

Returns an immutable reverse iterator located at the reverse beginning of this indirect array.

The reverse beginning corresponds to the last pointer in the array.

Definition at line 465 of file IndirectArray.h.

◆ ReverseEnd() [1/2]

template<class T, class A = StandardAllocator>
reverse_iterator pcl::IndirectArray< T, A >::ReverseEnd ( )
inline

Returns a mutable reverse iterator located at the reverse end of this indirect array.

The reverse end corresponds to a (nonexistent) pointer immediately before the first pointer in the array.

Definition at line 488 of file IndirectArray.h.

◆ ReverseEnd() [2/2]

template<class T, class A = StandardAllocator>
const_reverse_iterator pcl::IndirectArray< T, A >::ReverseEnd ( ) const
inline

Returns an immutable reverse iterator located at the reverse end of this indirect array.

The reverse end corresponds to a (nonexistent) pointer immediately before the first pointer in the array.

Definition at line 500 of file IndirectArray.h.

◆ Rotate()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Rotate ( distance_type  n)
inline

#

Definition at line 1503 of file IndirectArray.h.

◆ Search() [1/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Search ( const T &  v) const
inline

#

Definition at line 1524 of file IndirectArray.h.

◆ Search() [2/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::Search ( const T *  p) const
inline

#

Definition at line 1531 of file IndirectArray.h.

◆ Search() [3/3]

template<class T, class A = StandardAllocator>
template<class BP >
iterator pcl::IndirectArray< T, A >::Search ( const T &  v,
BP  p 
) const
inline

#

Definition at line 1539 of file IndirectArray.h.

◆ SearchLast() [1/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::SearchLast ( const T &  v) const
inline

#

Definition at line 1547 of file IndirectArray.h.

◆ SearchLast() [2/3]

template<class T, class A = StandardAllocator>
iterator pcl::IndirectArray< T, A >::SearchLast ( const T *  p) const
inline

#

Definition at line 1554 of file IndirectArray.h.

◆ SearchLast() [3/3]

template<class T, class A = StandardAllocator>
template<class BP >
iterator pcl::IndirectArray< T, A >::SearchLast ( const T &  v,
BP  p 
) const
inline

#

Definition at line 1562 of file IndirectArray.h.

◆ SearchLastSubset() [1/4]

template<class T, class A = StandardAllocator>
template<class BI >
iterator pcl::IndirectArray< T, A >::SearchLastSubset ( BI  i,
BI  j 
) const
inline

#

Definition at line 1605 of file IndirectArray.h.

◆ SearchLastSubset() [2/4]

template<class T, class A = StandardAllocator>
template<class BI , class BP >
iterator pcl::IndirectArray< T, A >::SearchLastSubset ( BI  i,
BI  j,
BP  p 
) const
inline

#

Definition at line 1613 of file IndirectArray.h.

◆ SearchLastSubset() [3/4]

template<class T, class A = StandardAllocator>
template<class C >
iterator pcl::IndirectArray< T, A >::SearchLastSubset ( const C &  c) const
inline

#

Definition at line 1622 of file IndirectArray.h.

◆ SearchLastSubset() [4/4]

template<class T, class A = StandardAllocator>
template<class C , class BP >
iterator pcl::IndirectArray< T, A >::SearchLastSubset ( const C &  c,
BP  p 
) const
inline

#

Definition at line 1630 of file IndirectArray.h.

◆ SearchSubset() [1/4]

template<class T, class A = StandardAllocator>
template<class FI >
iterator pcl::IndirectArray< T, A >::SearchSubset ( FI  i,
FI  j 
) const
inline

#

Definition at line 1571 of file IndirectArray.h.

◆ SearchSubset() [2/4]

template<class T, class A = StandardAllocator>
template<class FI , class BP >
iterator pcl::IndirectArray< T, A >::SearchSubset ( FI  i,
FI  j,
BP  p 
) const
inline

#

Definition at line 1579 of file IndirectArray.h.

◆ SearchSubset() [3/4]

template<class T, class A = StandardAllocator>
template<class C >
iterator pcl::IndirectArray< T, A >::SearchSubset ( const C &  c) const
inline

#

Definition at line 1588 of file IndirectArray.h.

◆ SearchSubset() [4/4]

template<class T, class A = StandardAllocator>
template<class C , class BP >
iterator pcl::IndirectArray< T, A >::SearchSubset ( const C &  c,
BP  p 
) const
inline

#

Definition at line 1596 of file IndirectArray.h.

◆ SetAllocator()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::SetAllocator ( const allocator a)
inline

Sets a new allocator object for this array.

Definition at line 329 of file IndirectArray.h.

◆ ShiftLeft()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::ShiftLeft ( const T *  p,
size_type  n = 1 
)
inline

#

Definition at line 1510 of file IndirectArray.h.

◆ ShiftRight()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::ShiftRight ( const T *  p,
size_type  n = 1 
)
inline

#

Definition at line 1517 of file IndirectArray.h.

◆ Shrink()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Shrink ( size_type  n = 1)
inline

Removes a contiguous trailing sequence of n existing pointers from this indirect array. This operation is equivalent to:

Truncate( End() - n )

If the specified count n is greater than or equal to the length of this array, this function calls Clear() to yield an empty array.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 784 of file IndirectArray.h.

◆ Size()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::Size ( ) const
inline

Returns the total number of bytes required to store the array of data pointers contained by this indirect array.

Definition at line 237 of file IndirectArray.h.

◆ Sort() [1/2]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Sort ( )
inline

#

Definition at line 1692 of file IndirectArray.h.

◆ Sort() [2/2]

template<class T, class A = StandardAllocator>
template<class BP >
void pcl::IndirectArray< T, A >::Sort ( BP  p)
inline

#

Definition at line 1700 of file IndirectArray.h.

◆ Squeeze()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Squeeze ( )
inline

Causes this indirect array to allocate the exact required memory space to store its contained pointers.

If the array has excess capacity, a new copy of its contained pointers is generated and stored in a newly allocated memory block that fits them exactly, then the previous memory block is deallocated.

If the array is empty, calling this function is equivalent to Clear(). Note that in this case a previously allocated memory block (by a call to Reserve()) may also be deallocated.

Definition at line 1367 of file IndirectArray.h.

◆ ToCommaSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::IndirectArray< T, A >::ToCommaSeparated ( S &  s) const
inline

Generates a comma-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, ',' );

Definition at line 1807 of file IndirectArray.h.

◆ ToNewLineSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::IndirectArray< T, A >::ToNewLineSeparated ( S &  s) const
inline

Generates a newline-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, '\n' );

Definition at line 1849 of file IndirectArray.h.

◆ ToSeparated() [1/2]

template<class T, class A = StandardAllocator>
template<class S , typename SP >
S& pcl::IndirectArray< T, A >::ToSeparated ( S &  s,
SP  separator 
) const
inline

Generates a sequence of string tokens separated with the specified separator string. Returns a reference to the target string s.

For each non-null pointer in this indirect array, this function appends a string representation of the pointed object (known as a token) to the target string s. If the array contains more than one non-null pointer, successive tokens are separated with the specified separator.

The string type S must have a meaningful Append() member function and type conversion semantics to transform an array element to a string. The standard String and IsoString PCL classes provide the required functionality for most scalar types, although it is probably better to use String::ToSeparated() and IsoString::ToSeparated() instead of calling these functions directly.

Definition at line 1730 of file IndirectArray.h.

◆ ToSeparated() [2/2]

template<class T, class A = StandardAllocator>
template<class S , typename SP , class AF >
S& pcl::IndirectArray< T, A >::ToSeparated ( S &  s,
SP  separator,
AF  append 
) const
inline

Generates a sequence of string tokens separated with the specified separator string by calling an append function. Returns a reference to the target string s.

For each non-null pointer p in this indirect array, this function appends a string representation of the pointed object (known as a token) to the target string s by calling the append function:

append( s, S( *p ) );

If the array contains more than one non-null pointer, successive tokens are separated by calling:

append( s, S( separator ) );

The string type S must have type conversion semantics to transform an array element to a string. The standard String and IsoString PCL classes provide the required functionality for most scalar types, although it is probably easier to use String::ToSeparated() and IsoString::ToSeparated() instead of calling these functions directly.

Definition at line 1774 of file IndirectArray.h.

◆ ToSpaceSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::IndirectArray< T, A >::ToSpaceSeparated ( S &  s) const
inline

Generates a space-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, ' ' );

Definition at line 1821 of file IndirectArray.h.

◆ ToTabSeparated()

template<class T, class A = StandardAllocator>
template<class S >
S& pcl::IndirectArray< T, A >::ToTabSeparated ( S &  s) const
inline

Generates a tabulator-separated sequence of string tokens. Returns a reference to the target string s.

This function is equivalent to:

ToSeparated( s, '\t' );

Definition at line 1835 of file IndirectArray.h.

◆ Transfer() [1/2]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Transfer ( IndirectArray< T, A > &  x)
inline

Transfers data from another indirect array x to this object.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Transfers source array data to this object, leaving empty and invalid the source object x.

Definition at line 658 of file IndirectArray.h.

◆ Transfer() [2/2]

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Transfer ( IndirectArray< T, A > &&  x)
inline

Transfers data from another indirect array x to this object.

Decrements the reference counter of the current array data, and destroys it if it becomes unreferenced.

Transfers source array data to this object, leaving empty and invalid the source object x.

Definition at line 672 of file IndirectArray.h.

◆ Truncate()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::Truncate ( const_iterator  i)
inline

Removes a trailing sequence of contiguous pointers from the specified iterator of this array. This operation is equivalent to:

Remove( i, End() )

If the specified iterator is located at or after the end of this array, this function does nothing. Otherwise the iterator is constrained to stay in the range [Begin(),End()) of existing array elements.

Only pointers are removed by this function; the pointed objects are not affected in any way.

Definition at line 998 of file IndirectArray.h.

◆ UniquifyIterator()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::UniquifyIterator ( iterator i)
inline

Ensures that the specified iterator points to a uniquely referenced pointer. If necessary, this function builds a new, uniquely referenced copy of this indirect array by calling EnsureUnique().

If the iterator i is changed, it is guaranteed to point to the pointer at the same array index it was pointing to before calling this function.

Definition at line 561 of file IndirectArray.h.

◆ UniquifyIterators()

template<class T, class A = StandardAllocator>
void pcl::IndirectArray< T, A >::UniquifyIterators ( iterator i,
iterator j 
)
inline

Ensures that the specified iterators point to uniquely referenced pointers. If necessary, this function builds a new, uniquely referenced copy of this indirect array by calling EnsureUnique().

If the iterators i and j are changed, they are guaranteed to point to the pointers at the same array indices they were pointing to before calling this function.

Definition at line 575 of file IndirectArray.h.

◆ UpperBound()

template<class T, class A = StandardAllocator>
size_type pcl::IndirectArray< T, A >::UpperBound ( ) const
inline

Returns the maximum legal index in this array. It is equal to Length()-1. For empty arrays, this function returns a meaningless value.

Definition at line 313 of file IndirectArray.h.

Friends And Related Function Documentation

◆ Swap

template<class T, class A = StandardAllocator>
void Swap ( IndirectArray< T, A > &  x1,
IndirectArray< T, A > &  x2 
)
friend

Exchanges two indirect arrays x1 and x2.

Definition at line 1708 of file IndirectArray.h.


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