PCL
|
Dynamic sorted array of pointers to objects providing direct iteration and element access by reference. More...
#include <ReferenceSortedArray.h>
Public Types | |
using | allocator = typename array_implementation::allocator |
using | array_implementation = ReferenceArray< T, A > |
using | block_allocator = typename array_implementation::block_allocator |
using | const_indirect_iterator = typename array_implementation::const_indirect_iterator |
using | const_iterator = typename array_implementation::const_iterator |
using | const_reverse_iterator = typename array_implementation::const_reverse_iterator |
using | indirect_iterator = typename array_implementation::indirect_iterator |
using | iterator = typename array_implementation::iterator |
using | reverse_iterator = typename array_implementation::reverse_iterator |
Public Member Functions | |
ReferenceSortedArray ()=default | |
ReferenceSortedArray (const ReferenceSortedArray &)=default | |
template<class FI > | |
ReferenceSortedArray (FI i, FI j) | |
ReferenceSortedArray (ReferenceSortedArray &&)=default | |
ReferenceSortedArray (size_type n, const T *p) | |
~ReferenceSortedArray () | |
void | Add (const array_implementation &x) |
void | Add (const ReferenceSortedArray &x) |
const_iterator | Add (const T *p, size_type n=1) |
template<class FI > | |
void | Add (FI i, FI j) |
const allocator & | Allocator () const |
template<class F > | |
void | Apply (F f) const |
void | Assign (const array_implementation &x) |
void | Assign (const ReferenceSortedArray &x) |
void | Assign (const T *p, size_type n=1) |
template<class FI > | |
void | Assign (FI i, FI j) |
const_iterator | At (size_type i) const |
size_type | Available () const |
const_iterator | Begin () const |
const_iterator | begin () const |
size_type | Capacity () const |
void | Clear () |
template<class C > | |
void | CloneAssign (const C &x) |
void | CloneAssign (IndirectSortedArray< T, A > &x) |
void | CloneAssign (ReferenceSortedArray &x) |
void | CloneAssign (SortedArray< T, A > &x) |
bool | Contains (const T &v) const |
template<class BP > | |
bool | Contains (const T &v, BP p) const |
bool | Contains (const T *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) |
const_iterator | End () const |
const_iterator | end () const |
void | EnsureUnique () |
void | Fill (const T &v) |
const T & | First () const |
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) |
bool | IsAliasOf (const ReferenceSortedArray &x) const |
bool | IsEmpty () const |
bool | IsUnique () const |
bool | IsValid () const |
const T & | Last () const |
template<class F > | |
const_iterator | LastThat (F f) const |
size_type | Length () const |
size_type | LowerBound () const |
const_iterator | MaxItem () const |
template<class BP > | |
const_iterator | MaxItem (BP p) const |
const_iterator | MinItem () const |
template<class BP > | |
const_iterator | MinItem (BP p) const |
iterator | MutableAt (size_type i) |
iterator | MutableBegin () |
iterator | MutableEnd () |
T & | MutableFirst () |
iterator | MutableIterator (const_iterator i) |
T & | MutableLast () |
reverse_iterator | MutableReverseBegin () |
reverse_iterator | MutableReverseEnd () |
const T & | operator* () const |
ReferenceSortedArray & | operator= (array_implementation &&x) |
ReferenceSortedArray & | operator= (const array_implementation &x) |
ReferenceSortedArray & | operator= (const ReferenceSortedArray &x) |
ReferenceSortedArray & | operator= (ReferenceSortedArray &&x) |
const T & | operator[] (size_type i) const |
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 | RemovePointer (const T *p) |
void | Reserve (size_type n) |
const_reverse_iterator | ReverseBegin () const |
const_reverse_iterator | ReverseEnd () const |
const_iterator | Search (const T &v) const |
template<class BP > | |
const_iterator | Search (const T &v, BP p) const |
const_iterator | Search (const T *p) const |
const_iterator | SearchLast (const T &v) const |
template<class BP > | |
const_iterator | SearchLast (const T &v, BP p) const |
const_iterator | SearchLast (const T *p) const |
void | SetAllocator (const allocator &a) |
void | Shrink (size_type n=1) |
size_type | Size () const |
void | Sort () |
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 (array_implementation &&x) |
void | Transfer (array_implementation &x) |
void | Transfer (ReferenceSortedArray &&x) |
void | Transfer (ReferenceSortedArray &x) |
void | Truncate (const_iterator i) |
void | UniquifyIterator (iterator &i) |
void | UniquifyIterators (iterator &i, iterator &j) |
size_type | UpperBound () const |
Friends | |
bool | operator< (const array_implementation &x1, const ReferenceSortedArray &x2) |
bool | operator< (const ReferenceSortedArray &x1, const array_implementation &x2) |
bool | operator< (const ReferenceSortedArray &x1, const ReferenceSortedArray &x2) |
bool | operator== (const array_implementation &x1, const ReferenceSortedArray &x2) |
bool | operator== (const ReferenceSortedArray &x1, const array_implementation &x2) |
bool | operator== (const ReferenceSortedArray &x1, const ReferenceSortedArray &x2) |
void | Swap (ReferenceSortedArray &x1, ReferenceSortedArray &x2) |
ReferenceSortedArray is a generic, finite sorted sequence of pointers to objects, implemented as a reference-counted, dynamic array of pointers to T instances with automatic sorting of inserted array elements. The type A provides dynamic allocation for contiguous sequences of void* (StandardAllocator is used by default).
Ordering of array elements is implemented by indirection, that is, the pointed-to objects are compared for sorting, not the contained pointers.
Unlike IndirectArray and IndirectSortedArray, ReferenceSortedArray provides direct access to the objects pointed to by its contained pointers, including direct iteration through references instead of pointers. This makes ReferenceSortedArray a perfect replacement for SortedArray in cases where storing copies of objects is impractical or inviable; for example, when the objects to be stored are unique by nature. As a prerequisite for this functionality, ReferenceSortedArray, unlike IndirectSortedArray and IndirectArray, and like ReferenceArray, cannot contain null pointers.
Definition at line 100 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::allocator = typename array_implementation::allocator |
#
Definition at line 114 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::array_implementation = ReferenceArray<T,A> |
#
Definition at line 106 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::block_allocator = typename array_implementation::block_allocator |
#
Definition at line 110 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::const_indirect_iterator = typename array_implementation::const_indirect_iterator |
#
Definition at line 138 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::const_iterator = typename array_implementation::const_iterator |
#
Definition at line 122 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::const_reverse_iterator = typename array_implementation::const_reverse_iterator |
#
Definition at line 130 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::indirect_iterator = typename array_implementation::indirect_iterator |
#
Definition at line 134 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::iterator = typename array_implementation::iterator |
#
Definition at line 118 of file ReferenceSortedArray.h.
using pcl::ReferenceSortedArray< T, A >::reverse_iterator = typename array_implementation::reverse_iterator |
#
Definition at line 126 of file ReferenceSortedArray.h.
|
default |
Constructs an empty reference sorted array.
|
inline |
Constructs a reference sorted 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 153 of file ReferenceSortedArray.h.
|
inline |
Constructs a reference array as a copy of the sequence of non-null pointers defined by the range [i,j) of forward iterators. The stored sequence of pointers is sorted in ascending order by comparing the pointed objects.
If the range [i,j) contains null pointers, these are ignored and hence not included in the constructed reference array.
Definition at line 170 of file ReferenceSortedArray.h.
References pcl::Sort().
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Destroys a ReferenceSortedArray 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 193 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 786 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 774 of file ReferenceSortedArray.h.
References pcl::ReferenceSortedArray< T, A >::Begin(), and pcl::ReferenceSortedArray< T, A >::End().
|
inline |
#
Definition at line 793 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 803 of file ReferenceSortedArray.h.
|
inline |
Returns a reference to the allocator object used by this reference array.
Definition at line 318 of file ReferenceSortedArray.h.
|
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 1070 of file ReferenceSortedArray.h.
|
inline |
Assigns a reference array x to this reference sorted array.
Causes this reference sorted array to store a sorted copy of the pointers in the source array x. Sorting is performed by comparing the pointed objects, not the pointers.
Definition at line 627 of file ReferenceSortedArray.h.
References pcl::Sort().
|
inline |
Assigns a reference sorted array x to this reference sorted 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 565 of file ReferenceSortedArray.h.
|
inline |
Replaces the contents of this reference sorted array with a sequence of n pointers equal to p.
if p is nullptr
, this function yields an empty array.
Definition at line 681 of file ReferenceSortedArray.h.
|
inline |
Replaces the contents of this reference sorted array with a sorted 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. Sorting is performed by comparing the pointed objects, not the pointers.
Definition at line 698 of file ReferenceSortedArray.h.
References pcl::Sort().
|
inline |
Returns an immutable reference array iterator located at the specified array index i.
Definition at line 335 of file ReferenceSortedArray.h.
|
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 264 of file ReferenceSortedArray.h.
|
inline |
Returns an immutable iterator located at the beginning of this array.
Definition at line 385 of file ReferenceSortedArray.h.
Referenced by pcl::ReferenceSortedArray< T, A >::Add().
|
inline |
STL-compatible iteration. Equivalent to Begin() const.
Definition at line 529 of file ReferenceSortedArray.h.
|
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 252 of file ReferenceSortedArray.h.
|
inline |
Removes all pointers contained by this object, yielding an empty reference sorted 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 939 of file ReferenceSortedArray.h.
|
inline |
Replaces the contents of this reference sorted array with a sorted list 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 716 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 738 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 724 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 731 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1214 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1229 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1221 of file ReferenceSortedArray.h.
|
inline |
Returns the number of objects equal to v in this reference array.
Definition at line 1100 of file ReferenceSortedArray.h.
|
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 1123 of file ReferenceSortedArray.h.
|
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 1113 of file ReferenceSortedArray.h.
|
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 1133 of file ReferenceSortedArray.h.
|
inline |
Destroys and removes all objects in this reference sorted array, yielding an empty array.
Definition at line 1023 of file ReferenceSortedArray.h.
|
inline |
Destroys and removes all objects equal to v in this reference sorted 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.
Definition at line 994 of file ReferenceSortedArray.h.
|
inline |
Destroys and removes every object x in this reference sorted 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.
Definition at line 1011 of file ReferenceSortedArray.h.
|
inline |
Destroys and removes the objects in a range [i,j) of iterators in this reference sorted 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.
Definition at line 978 of file ReferenceSortedArray.h.
|
inline |
Destroys and removes a sequence of n contiguous objects, starting at the specified location i in this reference sorted 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.
Definition at line 955 of file ReferenceSortedArray.h.
|
inline |
Returns an immutable iterator located at the end of this array.
Definition at line 401 of file ReferenceSortedArray.h.
Referenced by pcl::ReferenceSortedArray< T, A >::Add().
|
inline |
STL-compatible iteration. Equivalent to End() const.
Definition at line 537 of file ReferenceSortedArray.h.
|
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 225 of file ReferenceSortedArray.h.
|
inline |
Sets all objects contained by this array equal to v.
Definition at line 1060 of file ReferenceSortedArray.h.
|
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 464 of file ReferenceSortedArray.h.
|
inline |
Returns an immutable iterator pointing to the first object x in this reference sorted array such that f( const T& x ) is true. Returns End() if such pointer does not exist.
Definition at line 1081 of file ReferenceSortedArray.h.
|
inline |
Returns a non-cryptographic hash value computed for this reference array. This function is a synonym for Hash64().
Definition at line 1449 of file ReferenceSortedArray.h.
References pcl::Hash64().
|
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 1440 of file ReferenceSortedArray.h.
|
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 1425 of file ReferenceSortedArray.h.
|
inline |
Causes this reference sorted 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. The sequence [i,j) is sorted in ascending order by comparing the pointed objects.
Definition at line 750 of file ReferenceSortedArray.h.
References pcl::Sort().
|
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 212 of file ReferenceSortedArray.h.
|
inline |
Returns true iff this reference array is empty.
Definition at line 292 of file ReferenceSortedArray.h.
|
inline |
Returns true iff this reference array uniquely references its contained array of pointers to objects.
Definition at line 201 of file ReferenceSortedArray.h.
|
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 ReferenceSortedArray objects are valid with only two exceptions:
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 284 of file ReferenceSortedArray.h.
|
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 482 of file ReferenceSortedArray.h.
|
inline |
Returns an immutable iterator pointing to the last object x in this reference sorted array such that f( const T& x ) is true. Returns End() if such pointer does not exist.
Definition at line 1092 of file ReferenceSortedArray.h.
|
inline |
Returns the length of this reference array.
Definition at line 242 of file ReferenceSortedArray.h.
|
inline |
Returns the minimum legal index in this array (always zero). For empty arrays, this function returns a meaningless value.
Definition at line 301 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1155 of file ReferenceSortedArray.h.
|
inline |
|
inline |
#
Definition at line 1140 of file ReferenceSortedArray.h.
|
inline |
|
inline |
Returns a mutable reference array iterator located at the specified array index i.
Definition at line 344 of file ReferenceSortedArray.h.
|
inline |
Returns a mutable iterator located at the beginning of this array.
Definition at line 393 of file ReferenceSortedArray.h.
|
inline |
Returns a mutable iterator located at the end of this array.
Definition at line 409 of file ReferenceSortedArray.h.
|
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 473 of file ReferenceSortedArray.h.
|
inline |
Returns a mutable iterator pointing to the same array element as the specified immutable iterator i.
Definition at line 359 of file ReferenceSortedArray.h.
|
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 491 of file ReferenceSortedArray.h.
|
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 431 of file ReferenceSortedArray.h.
|
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 455 of file ReferenceSortedArray.h.
|
inline |
Returns a reference to the unmodifiable first object in this reference array.
Definition at line 377 of file ReferenceSortedArray.h.
|
inline |
Move assignment of a reference array.
The transferred array is sorted after the assignment. Returns a reference to this object.
Definition at line 639 of file ReferenceSortedArray.h.
|
inline |
Assigns a reference array x to this reference sorted array.
Causes this reference sorted array to store a sorted copy of the pointers in the source array x. Sorting is performed by comparing the pointed objects, not the pointers. Returns a reference to this object.
Definition at line 614 of file ReferenceSortedArray.h.
|
inline |
Copy assignment operator.
Causes this reference sorted array to reference the same set of objects as another reference sorted array x. Returns a reference to this object.
Definition at line 550 of file ReferenceSortedArray.h.
|
inline |
Move assignment operator. Returns a reference to this object.
Definition at line 573 of file ReferenceSortedArray.h.
|
inline |
Returns a reference to the immutable object at the specified array index i. No bounds checking is performed.
Definition at line 368 of file ReferenceSortedArray.h.
|
inline |
Releases the set of pointers contained by this reference sorted 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 767 of file ReferenceSortedArray.h.
|
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 896 of file ReferenceSortedArray.h.
|
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 909 of file ReferenceSortedArray.h.
|
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 849 of file ReferenceSortedArray.h.
|
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 837 of file ReferenceSortedArray.h.
|
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 920 of file ReferenceSortedArray.h.
|
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 1035 of file ReferenceSortedArray.h.
|
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 420 of file ReferenceSortedArray.h.
|
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 443 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1170 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1185 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1177 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1192 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1207 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1199 of file ReferenceSortedArray.h.
|
inline |
Sets a new allocator object for this reference array.
Definition at line 326 of file ReferenceSortedArray.h.
|
inline |
Removes a contiguous trailing sequence of n existing pointers from this reference array. This operation is equivalent to:
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 884 of file ReferenceSortedArray.h.
|
inline |
Returns the total number of bytes required to store the array of object pointers contained by this reference array.
Definition at line 234 of file ReferenceSortedArray.h.
|
inline |
#
Definition at line 1236 of file ReferenceSortedArray.h.
|
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 1052 of file ReferenceSortedArray.h.
|
inline |
Generates a comma-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1368 of file ReferenceSortedArray.h.
|
inline |
Generates a newline-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1410 of file ReferenceSortedArray.h.
|
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 1326 of file ReferenceSortedArray.h.
|
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:
If the array contains more than one element, successive tokens are separated by calling:
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 1354 of file ReferenceSortedArray.h.
|
inline |
Generates a space-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1382 of file ReferenceSortedArray.h.
|
inline |
Generates a tabulator-separated sequence of string tokens. Returns a reference to the target string s.
This function is equivalent to:
Definition at line 1396 of file ReferenceSortedArray.h.
|
inline |
Transfers data from a 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. The transferred array is sorted after the assignment.
Definition at line 669 of file ReferenceSortedArray.h.
References pcl::Sort().
|
inline |
Transfers data from a 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. The transferred array is sorted after the assignment.
Definition at line 654 of file ReferenceSortedArray.h.
References pcl::Sort().
|
inline |
Transfers data from another reference sorted 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 602 of file ReferenceSortedArray.h.
|
inline |
Transfers data from another reference sorted 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 588 of file ReferenceSortedArray.h.
|
inline |
Removes a trailing sequence of contiguous pointers from the specified iterator of this reference array. This operation is equivalent to:
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 867 of file ReferenceSortedArray.h.
|
inline |
Ensures that the specified iterator represents a pointer stored in a uniquely referenced indirect 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 505 of file ReferenceSortedArray.h.
|
inline |
Ensures that the specified iterators represents a pointer stored in a uniquely referenced indirect 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 520 of file ReferenceSortedArray.h.
|
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 310 of file ReferenceSortedArray.h.
|
friend |
Exchanges two reference sorted arrays x1 and x2.
Definition at line 1244 of file ReferenceSortedArray.h.