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

Dynamic array of pointers to objects providing direct iteration and element access by reference. More...

#include <ReferenceArray.h>

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

Classes

class  const_iterator
 Immutable ReferenceArray iterator. More...
 
class  iterator
 Mutable ReferenceArray iterator. More...
 

Public Types

using allocator = typename array_implementation::allocator
 
using array_implementation = IndirectArray< T, A >
 
using block_allocator = typename array_implementation::block_allocator
 
using const_indirect_iterator = typename array_implementation::const_iterator
 
using indirect_iterator = typename array_implementation::iterator
 

Public Member Functions

 ReferenceArray ()=default
 
 ReferenceArray (const ReferenceArray &)=default
 
template<class FI >
 ReferenceArray (FI i, FI j)
 
 ReferenceArray (ReferenceArray &&)=default
 
 ReferenceArray (size_type n, const T *p)
 
 ~ReferenceArray ()
 
void Add (const ReferenceArray &x)
 
void Add (const T *p, size_type n=1)
 
template<class FI >
void Add (FI i, FI j)
 
const allocatorAllocator () const
 
void Append (const ReferenceArray &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 ReferenceArray &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 ()
 
iterator begin ()
 
const_iterator Begin () const
 
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
 
template<class BP >
bool Contains (const T &v, BP p) const
 
bool Contains (const T *p) const
 
template<class C >
iterator ContainsSubset (const C &c) const
 
template<class C , class BP >
iterator ContainsSubset (const C &c, 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
 
size_type Count (const T &v) const
 
template<class BP >
size_type Count (const T &v, BP p) const
 
size_type Count (const T *p) const
 
template<class UP >
size_type CountIf (UP p) const
 
void Destroy ()
 
void Destroy (const T &v)
 
template<class BP >
void Destroy (const T &v, BP p)
 
void Destroy (iterator i, iterator j)
 
void Destroy (iterator i, size_type n=1)
 
iterator End ()
 
iterator end ()
 
const_iterator End () const
 
const_iterator end () const
 
void EnsureUnique ()
 
void Fill (const T &v)
 
T & First ()
 
const T & First () const
 
template<class F >
iterator FirstThat (F f)
 
template<class F >
const_iterator FirstThat (F f) const
 
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 ReferenceArray &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 ReferenceArray &x) const
 
bool IsEmpty () const
 
bool IsUnique () const
 
bool IsValid () const
 
T & Last ()
 
const T & Last () const
 
template<class F >
iterator LastThat (F f)
 
template<class F >
const_iterator LastThat (F f) const
 
size_type Length () const
 
size_type LowerBound () const
 
iterator MaxItem ()
 
const_iterator MaxItem () const
 
template<class BP >
iterator MaxItem (BP p)
 
template<class BP >
const_iterator MaxItem (BP p) const
 
iterator MinItem ()
 
const_iterator MinItem () const
 
template<class BP >
iterator MinItem (BP p)
 
template<class BP >
const_iterator MinItem (BP p) const
 
iterator MutableIterator (const_iterator i)
 
T & operator* ()
 
const T & operator* () const
 
ReferenceArrayoperator= (const ReferenceArray &x)
 
ReferenceArrayoperator= (ReferenceArray &&x)
 
T & operator[] (size_type i)
 
const T & operator[] (size_type i) const
 
void Prepend (const ReferenceArray &x)
 
void Prepend (const T *p, size_type n=1)
 
template<class FI >
void Prepend (FI p, FI q)
 
indirect_iterator Release ()
 
void Remove (const T &v)
 
template<class BP >
void Remove (const T &v, BP p)
 
void Remove (const_iterator i, const_iterator j)
 
void Remove (const_iterator i, size_type n=1)
 
void RemoveFirst (size_type n=1)
 
void RemoveLast (size_type n=1)
 
void RemovePointer (const T *p)
 
iterator Replace (const_iterator i, const_iterator j, const ReferenceArray &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 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 &v) const
 
template<class BP >
iterator Search (const T &v, BP p)
 
template<class BP >
const_iterator Search (const T &v, BP p) const
 
iterator Search (const T *p)
 
const_iterator Search (const T *p) const
 
iterator SearchLast (const T &v)
 
const_iterator SearchLast (const T &v) const
 
template<class BP >
iterator SearchLast (const T &v, BP p)
 
template<class BP >
const_iterator SearchLast (const T &v, BP p) const
 
iterator SearchLast (const T *p)
 
const_iterator SearchLast (const T *p) const
 
template<class BI >
iterator SearchLastSubset (BI i, BI j)
 
template<class BI >
const_iterator SearchLastSubset (BI i, BI j) const
 
template<class BI , class BP >
iterator SearchLastSubset (BI i, BI j, BP p)
 
template<class BI , class BP >
const_iterator SearchLastSubset (BI i, BI j, BP p) const
 
template<class C >
iterator SearchLastSubset (const C &c)
 
template<class C >
const_iterator SearchLastSubset (const C &c) const
 
template<class C , class BP >
iterator SearchLastSubset (const C &c, BP p)
 
template<class C , class BP >
const_iterator SearchLastSubset (const C &c, BP p) const
 
template<class C >
iterator SearchSubset (const C &c)
 
template<class C >
const_iterator SearchSubset (const C &c) const
 
template<class C , class BP >
iterator SearchSubset (const C &c, BP p)
 
template<class C , class BP >
const_iterator SearchSubset (const C &c, BP p) const
 
template<class FI >
iterator SearchSubset (FI i, FI j)
 
template<class FI >
const_iterator SearchSubset (FI i, FI j) const
 
template<class FI , class BP >
iterator SearchSubset (FI i, FI j, BP p)
 
template<class FI , class BP >
const_iterator SearchSubset (FI i, FI j, 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 (ReferenceArray &&x)
 
void Transfer (ReferenceArray &x)
 
void Truncate (const_iterator i)
 
void UniquifyIterator (iterator &i)
 
void UniquifyIterators (iterator &i, iterator &j)
 
size_type UpperBound () const
 

Friends

void Swap (ReferenceArray &x1, ReferenceArray &x2)
 

Detailed Description

template<typename T, class A = StandardAllocator>
class pcl::ReferenceArray< T, A >

ReferenceArray 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).

Unlike IndirectArray, ReferenceArray provides direct access to the objects pointed to by its contained pointers, including direct iteration through references instead of pointers. This makes ReferenceArray a perfect replacement for Array in cases where storing copies of objects is inviable or impractical; for example, when the objects to be stored are unique by nature, when the cost of a copy operation is excessive, or as the underlying implementation of an heterogeneous container. As a prerequisite for this functionality, ReferenceArray, unlike IndirectArray, cannot contain null pointers.

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

Definition at line 95 of file ReferenceArray.h.

Member Typedef Documentation

◆ allocator

template<typename T , class A = StandardAllocator>
using pcl::ReferenceArray< T, A >::allocator = typename array_implementation::allocator

#

Definition at line 109 of file ReferenceArray.h.

◆ array_implementation

template<typename T , class A = StandardAllocator>
using pcl::ReferenceArray< T, A >::array_implementation = IndirectArray<T,A>

#

Definition at line 101 of file ReferenceArray.h.

◆ block_allocator

template<typename T , class A = StandardAllocator>
using pcl::ReferenceArray< T, A >::block_allocator = typename array_implementation::block_allocator

#

Definition at line 105 of file ReferenceArray.h.

◆ const_indirect_iterator

template<typename T , class A = StandardAllocator>
using pcl::ReferenceArray< T, A >::const_indirect_iterator = typename array_implementation::const_iterator

#

Definition at line 117 of file ReferenceArray.h.

◆ indirect_iterator

template<typename T , class A = StandardAllocator>
using pcl::ReferenceArray< T, A >::indirect_iterator = typename array_implementation::iterator

#

Definition at line 113 of file ReferenceArray.h.

Constructor & Destructor Documentation

◆ ReferenceArray() [1/5]

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

Constructs an empty reference array.

◆ ReferenceArray() [2/5]

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

Constructs a reference array that stores n copies of a non-null pointer p.

If p is nullptr, this function constructs an empty reference array.

Definition at line 594 of file ReferenceArray.h.

◆ ReferenceArray() [3/5]

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

Constructs a reference array as a copy of the sequence of non-null pointers defined by the range [i,j) of forward iterators.

If the range [i,j) contains null pointers, these are ignored and hence not included in the constructed reference array.

Definition at line 609 of file ReferenceArray.h.

◆ ReferenceArray() [4/5]

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

Copy constructor.

◆ ReferenceArray() [5/5]

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

Move constructor.

◆ ~ReferenceArray()

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

Destroys a ReferenceArray 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 633 of file ReferenceArray.h.

Member Function Documentation

◆ Add() [1/3]

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

A synonym for Append( const ReferenceArray<>& )

Definition at line 1333 of file ReferenceArray.h.

◆ Add() [2/3]

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

A synonym for Append( const T*, size_type )

Definition at line 1341 of file ReferenceArray.h.

◆ Add() [3/3]

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

A synonym for Append( FI, FI )

Definition at line 1350 of file ReferenceArray.h.

◆ Allocator()

template<typename T , class A = StandardAllocator>
const allocator& pcl::ReferenceArray< T, A >::Allocator ( ) const
inline

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

Definition at line 758 of file ReferenceArray.h.

◆ Append() [1/3]

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

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

Definition at line 1258 of file ReferenceArray.h.

◆ Append() [2/3]

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

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

If p is nullptr, this function has no effect.

Definition at line 1269 of file ReferenceArray.h.

◆ Append() [3/3]

template<typename T , class A = StandardAllocator>
template<class FI >
void pcl::ReferenceArray< 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 reference array.

If the range [p,q) contains null pointers, these are ignored and not inserted in this array.

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

Definition at line 1285 of file ReferenceArray.h.

◆ Apply() [1/2]

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

Calls f( T& x ) for every object x in this reference array, successively from the first contained object to the last.

Definition at line 1678 of file ReferenceArray.h.

◆ Apply() [2/2]

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

Calls f( const T& x ) for every unmodifiable object x in this reference array, successively from the first contained object to the last.

Definition at line 1688 of file ReferenceArray.h.

◆ Assign() [1/3]

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

Assigns a reference array x to this reference 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 1080 of file ReferenceArray.h.

◆ Assign() [2/3]

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

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

if p is nullptr, this function yields an empty array.

Definition at line 1128 of file ReferenceArray.h.

◆ Assign() [3/3]

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

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

If the range [i,j) contains null pointers, these are ignored and hence not included in this reference array.

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

Definition at line 1146 of file ReferenceArray.h.

◆ At() [1/2]

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

Returns a mutable reference array iterator located at the specified array index i.

Definition at line 775 of file ReferenceArray.h.

◆ At() [2/2]

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

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

Definition at line 784 of file ReferenceArray.h.

◆ Available()

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

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

Definition at line 704 of file ReferenceArray.h.

◆ Begin() [1/2]

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

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

Definition at line 842 of file ReferenceArray.h.

Referenced by pcl::operator<(), pcl::operator==(), and pcl::AbstractImage::RunThreads().

◆ begin() [1/2]

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

STL-compatible iteration. Equivalent to Begin().

Definition at line 1029 of file ReferenceArray.h.

◆ Begin() [2/2]

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

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

Definition at line 850 of file ReferenceArray.h.

◆ begin() [2/2]

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

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

Definition at line 1037 of file ReferenceArray.h.

◆ Capacity()

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

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

Definition at line 692 of file ReferenceArray.h.

◆ Clear()

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

Removes all pointers contained by this object, yielding an empty reference 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 1490 of file ReferenceArray.h.

Referenced by pcl::XMLElement::ReleaseChildNodes().

◆ CloneAssign()

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

Replaces the contents of this reference 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 newly allocated objects. You should call Destroy() to deallocate these objects before destructing this reference array in order to avoid a memory leak.

Definition at line 1165 of file ReferenceArray.h.

◆ ConstBegin()

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

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

Definition at line 858 of file ReferenceArray.h.

◆ ConstEnd()

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

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

Definition at line 882 of file ReferenceArray.h.

◆ ConstReverseBegin()

template<typename T , class A = StandardAllocator>
const_reverse_iterator pcl::ReferenceArray< 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 915 of file ReferenceArray.h.

◆ ConstReverseEnd()

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

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

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

Definition at line 954 of file ReferenceArray.h.

◆ Contains() [1/3]

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

#

Definition at line 2083 of file ReferenceArray.h.

◆ Contains() [2/3]

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

#

Definition at line 2098 of file ReferenceArray.h.

◆ Contains() [3/3]

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

#

Definition at line 2090 of file ReferenceArray.h.

◆ ContainsSubset() [1/4]

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

#

Definition at line 2122 of file ReferenceArray.h.

◆ ContainsSubset() [2/4]

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

#

Definition at line 2130 of file ReferenceArray.h.

◆ ContainsSubset() [3/4]

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

#

Definition at line 2106 of file ReferenceArray.h.

◆ ContainsSubset() [4/4]

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

#

Definition at line 2114 of file ReferenceArray.h.

◆ Count() [1/3]

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

Returns the number of objects equal to v in this reference array.

Definition at line 1740 of file ReferenceArray.h.

◆ Count() [2/3]

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

Returns the number of objects in this reference array such that for each counted object x the binary predicate p( x, v ) returns true.

Definition at line 1762 of file ReferenceArray.h.

◆ Count() [3/3]

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

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

If p is nullptr, this function should return zero — or you are in serious trouble!

Definition at line 1752 of file ReferenceArray.h.

◆ CountIf()

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

Returns the number of objects in this reference array such that for each counted object x the unary predicate p( x ) returns true.

Definition at line 1772 of file ReferenceArray.h.

References pcl::CountIf().

◆ Destroy() [1/5]

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

Destroys and removes all objects in this reference array, yielding an empty array.

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

Definition at line 1573 of file ReferenceArray.h.

◆ Destroy() [2/5]

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

Destroys and removes all objects equal to v in this reference 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 Destroy( iterator, iterator ) for critical information on this member function.

Definition at line 1544 of file ReferenceArray.h.

◆ Destroy() [3/5]

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

Destroys and removes every object x in this reference 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 Destroy( iterator, iterator ) for critical information on this member function.

Definition at line 1561 of file ReferenceArray.h.

◆ Destroy() [4/5]

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

Destroys and removes the objects in a range [i,j) of iterators in this reference 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
This function is potentially dangerous. If the array contains duplicate 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 have the destroyed objects removed. However, be aware of potential problems if other reference or indirect containers store pointers to deleted objects in different data structures, which will be invalid after calling this function.

Definition at line 1529 of file ReferenceArray.h.

◆ Destroy() [5/5]

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

Destroys and removes a sequence of n contiguous objects, starting at the specified location i in this reference 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 Destroy( iterator, iterator ) for critical information on this member function.

Definition at line 1506 of file ReferenceArray.h.

Referenced by pcl::AbstractImage::RunThreads().

◆ End() [1/2]

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

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

Definition at line 866 of file ReferenceArray.h.

Referenced by pcl::operator<(), pcl::operator==(), and pcl::AbstractImage::RunThreads().

◆ end() [1/2]

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

STL-compatible iteration. Equivalent to End().

Definition at line 1045 of file ReferenceArray.h.

◆ End() [2/2]

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

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

Definition at line 874 of file ReferenceArray.h.

◆ end() [2/2]

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

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

Definition at line 1053 of file ReferenceArray.h.

◆ EnsureUnique()

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

Ensures that this reference array uniquely references its contained object 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 665 of file ReferenceArray.h.

◆ Fill()

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

Sets all objects contained by this array equal to v.

Definition at line 1668 of file ReferenceArray.h.

◆ First() [1/2]

template<typename T , class A = StandardAllocator>
T& pcl::ReferenceArray< T, A >::First ( )
inline

Returns a reference to the first object in this reference array. This function should never be called for an empty array.

Definition at line 964 of file ReferenceArray.h.

◆ First() [2/2]

template<typename T , class A = StandardAllocator>
const T& pcl::ReferenceArray< T, A >::First ( ) const
inline

Returns a reference to the first unmodifiable object in this reference array. This function should never be called for an empty array.

Definition at line 973 of file ReferenceArray.h.

◆ FirstThat() [1/2]

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

Returns a mutable iterator pointing to the first object x in this reference array such that f( const T& x ) is true. Returns End() if such pointer does not exist.

Definition at line 1710 of file ReferenceArray.h.

◆ FirstThat() [2/2]

template<typename T , class A = StandardAllocator>
template<class F >
const_iterator pcl::ReferenceArray< T, A >::FirstThat ( f) const
inline

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

Definition at line 1699 of file ReferenceArray.h.

◆ Hash()

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

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

Definition at line 2327 of file ReferenceArray.h.

References pcl::Hash64().

◆ Hash32()

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

Returns a 32-bit non-cryptographic hash value computed for this reference 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 2318 of file ReferenceArray.h.

◆ Hash64()

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

Returns a 64-bit non-cryptographic hash value computed for this reference 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 2303 of file ReferenceArray.h.

◆ Import()

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

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

Definition at line 1176 of file ReferenceArray.h.

◆ Insert() [1/3]

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

Inserts a copy of the sequence of pointers contained by the reference array x at the specified location i in this reference 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 1208 of file ReferenceArray.h.

◆ Insert() [2/3]

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

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

If p is nullptr, this function has no effect. 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 or p is nullptr.

Definition at line 1224 of file ReferenceArray.h.

◆ Insert() [3/3]

template<typename T , class A = StandardAllocator>
template<class FI >
iterator pcl::ReferenceArray< 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 in this reference array.

If the range [p,q) contains null pointers, these are ignored and not inserted in this 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 inserted array element, or i if q <= p or no element in [p,q) is a non-null pointer.

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

Definition at line 1245 of file ReferenceArray.h.

◆ IsAliasOf()

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

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

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

Definition at line 652 of file ReferenceArray.h.

◆ IsEmpty()

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

Returns true iff this reference array is empty.

Definition at line 732 of file ReferenceArray.h.

Referenced by pcl::AbstractImage::RunThreads().

◆ IsUnique()

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

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

Definition at line 641 of file ReferenceArray.h.

◆ IsValid()

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

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

In general, all ReferenceArray 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 724 of file ReferenceArray.h.

◆ Last() [1/2]

template<typename T , class A = StandardAllocator>
T& pcl::ReferenceArray< T, A >::Last ( )
inline

Returns a reference to the last object in this reference array. This function should never be called for an empty array.

Definition at line 982 of file ReferenceArray.h.

◆ Last() [2/2]

template<typename T , class A = StandardAllocator>
const T& pcl::ReferenceArray< T, A >::Last ( ) const
inline

Returns a reference to the last unmodifiable object in this reference array. This function should never be called for an empty array.

Definition at line 991 of file ReferenceArray.h.

◆ LastThat() [1/2]

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

Returns a mutable iterator pointing to the last object x in this reference array such that f( const T& x ) is true. Returns End() if such pointer does not exist.

Definition at line 1732 of file ReferenceArray.h.

◆ LastThat() [2/2]

template<typename T , class A = StandardAllocator>
template<class F >
const_iterator pcl::ReferenceArray< T, A >::LastThat ( f) const
inline

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

Definition at line 1721 of file ReferenceArray.h.

◆ Length()

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

Returns the length of this reference array.

Definition at line 682 of file ReferenceArray.h.

Referenced by pcl::operator==(), and pcl::AbstractImage::RunThreads().

◆ LowerBound()

template<typename T , class A = StandardAllocator>
size_type pcl::ReferenceArray< 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 741 of file ReferenceArray.h.

◆ MaxItem() [1/4]

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

#

Definition at line 1816 of file ReferenceArray.h.

References pcl::MaxItem().

◆ MaxItem() [2/4]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::MaxItem ( ) const
inline

#

Definition at line 1809 of file ReferenceArray.h.

References pcl::MaxItem().

◆ MaxItem() [3/4]

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

#

Definition at line 1832 of file ReferenceArray.h.

References pcl::MaxItem().

◆ MaxItem() [4/4]

template<typename T , class A = StandardAllocator>
template<class BP >
const_iterator pcl::ReferenceArray< T, A >::MaxItem ( BP  p) const
inline

#

Definition at line 1824 of file ReferenceArray.h.

References pcl::MaxItem().

◆ MinItem() [1/4]

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

#

Definition at line 1786 of file ReferenceArray.h.

References pcl::MinItem().

◆ MinItem() [2/4]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::MinItem ( ) const
inline

#

Definition at line 1779 of file ReferenceArray.h.

References pcl::MinItem().

◆ MinItem() [3/4]

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

#

Definition at line 1802 of file ReferenceArray.h.

References pcl::MinItem().

◆ MinItem() [4/4]

template<typename T , class A = StandardAllocator>
template<class BP >
const_iterator pcl::ReferenceArray< T, A >::MinItem ( BP  p) const
inline

#

Definition at line 1794 of file ReferenceArray.h.

References pcl::MinItem().

◆ MutableIterator()

template<typename T , class A = StandardAllocator>
iterator pcl::ReferenceArray< 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 799 of file ReferenceArray.h.

◆ operator*() [1/2]

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

Returns a reference to the first object in this reference array.

Definition at line 825 of file ReferenceArray.h.

◆ operator*() [2/2]

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

Returns a reference to the unmodifiable first object in this reference array.

Definition at line 834 of file ReferenceArray.h.

◆ operator=() [1/2]

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

Copy assignment operator.

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

Definition at line 1065 of file ReferenceArray.h.

◆ operator=() [2/2]

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

Move assignment operator. Returns a reference to this object.

Definition at line 1088 of file ReferenceArray.h.

◆ operator[]() [1/2]

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

Returns a reference to the object at the specified array index i. No bounds checking is performed.

Definition at line 808 of file ReferenceArray.h.

◆ operator[]() [2/2]

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

Returns a reference to the immutable object at the specified array index i. No bounds checking is performed.

Definition at line 817 of file ReferenceArray.h.

◆ Prepend() [1/3]

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

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

Definition at line 1296 of file ReferenceArray.h.

◆ Prepend() [2/3]

template<typename T , class A = StandardAllocator>
void pcl::ReferenceArray< 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.

If p is nullptr, this function has no effect.

Definition at line 1307 of file ReferenceArray.h.

◆ Prepend() [3/3]

template<typename T , class A = StandardAllocator>
template<class FI >
void pcl::ReferenceArray< 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.

If the range [p,q) contains null pointers, these are ignored and not inserted in this array.

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

Definition at line 1323 of file ReferenceArray.h.

◆ Release()

template<typename T , class A = StandardAllocator>
indirect_iterator pcl::ReferenceArray< T, A >::Release ( )
inline

Releases the set of pointers contained by this reference 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 1192 of file ReferenceArray.h.

◆ Remove() [1/4]

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

Removes all existing pointers whose pointed objects are equal to the specified value v in this reference array.

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

Definition at line 1447 of file ReferenceArray.h.

◆ Remove() [2/4]

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

Removes every pointer x in this reference 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 1460 of file ReferenceArray.h.

◆ Remove() [3/4]

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

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

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

Definition at line 1374 of file ReferenceArray.h.

◆ Remove() [4/4]

template<typename T , class A = StandardAllocator>
void pcl::ReferenceArray< 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 reference array.

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

Definition at line 1362 of file ReferenceArray.h.

◆ RemoveFirst()

template<typename T , class A = StandardAllocator>
void pcl::ReferenceArray< T, A >::RemoveFirst ( size_type  n = 1)
inline

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

Remove( Begin(), At( n ) );
iterator At(size_type i)
void Remove(const_iterator i, size_type n=1)

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 1391 of file ReferenceArray.h.

◆ RemoveLast()

template<typename T , class A = StandardAllocator>
void pcl::ReferenceArray< T, A >::RemoveLast ( size_type  n = 1)
inline

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

Truncate( End() - n );
void Truncate(const_iterator i)

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 1408 of file ReferenceArray.h.

◆ RemovePointer()

template<typename T , class A = StandardAllocator>
void pcl::ReferenceArray< T, A >::RemovePointer ( const T *  p)
inline

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

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

Definition at line 1471 of file ReferenceArray.h.

◆ Replace() [1/3]

template<typename T , class A = StandardAllocator>
iterator pcl::ReferenceArray< T, A >::Replace ( const_iterator  i,
const_iterator  j,
const ReferenceArray< 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 a reference 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 a null iterator if the resulting array is empty.

Definition at line 1591 of file ReferenceArray.h.

◆ Replace() [2/3]

template<typename T , class A = StandardAllocator>
iterator pcl::ReferenceArray< 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 reference array by n copies of the specified non-null pointer p.

If p is nullptr, this function removes the subset [i,j) from this array, as if n = 0 had been specified.

Definition at line 1604 of file ReferenceArray.h.

◆ Replace() [3/3]

template<typename T , class A = StandardAllocator>
template<class FI >
iterator pcl::ReferenceArray< 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 reference array by the sequence of pointers in the range [p,q) of forward iterators.

If the range [p,q) contains null pointers, these are ignored and not inserted in this 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.

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

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

Definition at line 1627 of file ReferenceArray.h.

References pcl::IndirectArray< T, A >::Append().

◆ Reserve()

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

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

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

Definition at line 1643 of file ReferenceArray.h.

◆ Reverse()

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

#

Definition at line 1839 of file ReferenceArray.h.

◆ ReverseBegin() [1/2]

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

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

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

Definition at line 893 of file ReferenceArray.h.

◆ ReverseBegin() [2/2]

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

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

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

Definition at line 904 of file ReferenceArray.h.

◆ ReverseEnd() [1/2]

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

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

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

Definition at line 928 of file ReferenceArray.h.

◆ ReverseEnd() [2/2]

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

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

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

Definition at line 941 of file ReferenceArray.h.

◆ Rotate()

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

#

Definition at line 1846 of file ReferenceArray.h.

◆ Search() [1/6]

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

#

Definition at line 1874 of file ReferenceArray.h.

◆ Search() [2/6]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::Search ( const T &  v) const
inline

#

Definition at line 1867 of file ReferenceArray.h.

◆ Search() [3/6]

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

#

Definition at line 1904 of file ReferenceArray.h.

◆ Search() [4/6]

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

#

Definition at line 1896 of file ReferenceArray.h.

◆ Search() [5/6]

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

#

Definition at line 1888 of file ReferenceArray.h.

◆ Search() [6/6]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::Search ( const T *  p) const
inline

#

Definition at line 1881 of file ReferenceArray.h.

◆ SearchLast() [1/6]

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

#

Definition at line 1918 of file ReferenceArray.h.

◆ SearchLast() [2/6]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::SearchLast ( const T &  v) const
inline

#

Definition at line 1911 of file ReferenceArray.h.

◆ SearchLast() [3/6]

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

#

Definition at line 1948 of file ReferenceArray.h.

◆ SearchLast() [4/6]

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

#

Definition at line 1940 of file ReferenceArray.h.

◆ SearchLast() [5/6]

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

#

Definition at line 1932 of file ReferenceArray.h.

◆ SearchLast() [6/6]

template<typename T , class A = StandardAllocator>
const_iterator pcl::ReferenceArray< T, A >::SearchLast ( const T *  p) const
inline

#

Definition at line 1925 of file ReferenceArray.h.

◆ SearchLastSubset() [1/8]

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

#

Definition at line 2028 of file ReferenceArray.h.

References pcl::SearchLast().

◆ SearchLastSubset() [2/8]

template<typename T , class A = StandardAllocator>
template<class BI >
const_iterator pcl::ReferenceArray< T, A >::SearchLastSubset ( BI  i,
BI  j 
) const
inline

#

Definition at line 2020 of file ReferenceArray.h.

References pcl::SearchLast().

◆ SearchLastSubset() [3/8]

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

#

Definition at line 2044 of file ReferenceArray.h.

References pcl::SearchLast().

◆ SearchLastSubset() [4/8]

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

#

Definition at line 2036 of file ReferenceArray.h.

References pcl::SearchLast().

◆ SearchLastSubset() [5/8]

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

#

Definition at line 2060 of file ReferenceArray.h.

◆ SearchLastSubset() [6/8]

template<typename T , class A = StandardAllocator>
template<class C >
const_iterator pcl::ReferenceArray< T, A >::SearchLastSubset ( const C &  c) const
inline

#

Definition at line 2052 of file ReferenceArray.h.

◆ SearchLastSubset() [7/8]

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

#

Definition at line 2076 of file ReferenceArray.h.

◆ SearchLastSubset() [8/8]

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

#

Definition at line 2068 of file ReferenceArray.h.

◆ SearchSubset() [1/8]

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

#

Definition at line 1996 of file ReferenceArray.h.

◆ SearchSubset() [2/8]

template<typename T , class A = StandardAllocator>
template<class C >
const_iterator pcl::ReferenceArray< T, A >::SearchSubset ( const C &  c) const
inline

#

Definition at line 1988 of file ReferenceArray.h.

◆ SearchSubset() [3/8]

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

#

Definition at line 2012 of file ReferenceArray.h.

◆ SearchSubset() [4/8]

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

#

Definition at line 2004 of file ReferenceArray.h.

◆ SearchSubset() [5/8]

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

#

Definition at line 1964 of file ReferenceArray.h.

References pcl::Search().

◆ SearchSubset() [6/8]

template<typename T , class A = StandardAllocator>
template<class FI >
const_iterator pcl::ReferenceArray< T, A >::SearchSubset ( FI  i,
FI  j 
) const
inline

#

Definition at line 1956 of file ReferenceArray.h.

References pcl::Search().

◆ SearchSubset() [7/8]

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

#

Definition at line 1980 of file ReferenceArray.h.

References pcl::Search().

◆ SearchSubset() [8/8]

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

#

Definition at line 1972 of file ReferenceArray.h.

References pcl::Search().

◆ SetAllocator()

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

Sets a new allocator object for this reference array.

Definition at line 766 of file ReferenceArray.h.

◆ ShiftLeft()

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

#

Definition at line 1853 of file ReferenceArray.h.

◆ ShiftRight()

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

#

Definition at line 1860 of file ReferenceArray.h.

◆ Shrink()

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

Removes a contiguous trailing sequence of n existing pointers from this reference array. This function is a synonym for RemoveLast().

Definition at line 1435 of file ReferenceArray.h.

◆ Size()

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

Returns the total number of bytes required to store the array of object pointers contained by this reference array.

Definition at line 674 of file ReferenceArray.h.

◆ Sort() [1/2]

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

#

Definition at line 2137 of file ReferenceArray.h.

References pcl::QuickSort().

◆ Sort() [2/2]

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

#

Definition at line 2146 of file ReferenceArray.h.

References pcl::QuickSort().

◆ Squeeze()

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

Causes this reference 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 1660 of file ReferenceArray.h.

◆ ToCommaSeparated()

template<typename T , class A = StandardAllocator>
template<class S >
S& pcl::ReferenceArray< 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, ',' );
S & ToSeparated(S &s, SP separator) const

Definition at line 2246 of file ReferenceArray.h.

◆ ToNewLineSeparated()

template<typename T , class A = StandardAllocator>
template<class S >
S& pcl::ReferenceArray< 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 2288 of file ReferenceArray.h.

◆ ToSeparated() [1/2]

template<typename T , class A = StandardAllocator>
template<class S , typename SP >
S& pcl::ReferenceArray< 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 element in this array, this function appends a string representation (known as a token) to the target string s. If the array contains more than one element, 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 2177 of file ReferenceArray.h.

◆ ToSeparated() [2/2]

template<typename T , class A = StandardAllocator>
template<class S , typename SP , class AF >
S& pcl::ReferenceArray< 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 element x in this array, this function appends a string representation (known as a token) to the target string s by calling the append function:

append( s, S( x ) );

If the array contains more than one element, 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 2217 of file ReferenceArray.h.

◆ ToSpaceSeparated()

template<typename T , class A = StandardAllocator>
template<class S >
S& pcl::ReferenceArray< 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 2260 of file ReferenceArray.h.

◆ ToTabSeparated()

template<typename T , class A = StandardAllocator>
template<class S >
S& pcl::ReferenceArray< 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 2274 of file ReferenceArray.h.

◆ Transfer() [1/2]

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

Transfers data from another reference 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 1117 of file ReferenceArray.h.

◆ Transfer() [2/2]

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

Transfers data from another reference 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 1103 of file ReferenceArray.h.

◆ Truncate()

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

Removes a trailing sequence of contiguous pointers from the specified iterator of this reference 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 1426 of file ReferenceArray.h.

◆ UniquifyIterator()

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

Ensures that the specified iterator represents a pointer stored in a uniquely referenced reference array. If necessary, this function builds a new, uniquely referenced copy of the underlying indirect array by calling EnsureUnique().

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

Definition at line 1005 of file ReferenceArray.h.

◆ UniquifyIterators()

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

Ensures that the specified iterators represents a pointer stored in a uniquely referenced reference array. If necessary, this function builds a new, uniquely referenced copy of the underlying indirect array by calling EnsureUnique().

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

Definition at line 1020 of file ReferenceArray.h.

◆ UpperBound()

template<typename T , class A = StandardAllocator>
size_type pcl::ReferenceArray< 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 750 of file ReferenceArray.h.

Friends And Related Function Documentation

◆ Swap

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

Exchanges two reference arrays x1 and x2.

Definition at line 2155 of file ReferenceArray.h.


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