NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
|
A C-style array wrapped in the facade of a C++ STL container. More...
#include <be_memory_autoarray.h>
Public Types | |
using | value_type = T |
Type of element. More... | |
using | size_type = size_t |
Type of subscripts, counts, etc. More... | |
using | iterator = AutoArrayIterator< false, T > |
Iterator of element. More... | |
using | const_iterator = AutoArrayIterator< true, T > |
Const iterator of element. More... | |
using | reference = T & |
Reference to element. More... | |
using | const_reference = const T & |
Const reference element. More... | |
Public Member Functions | |
operator T* () | |
Convert AutoArray to T array. More... | |
operator const T * () const | |
Convert AutoArray to const T array. More... | |
reference | operator[] (ptrdiff_t index) |
Subscripting operator overload with unchecked access. More... | |
const_reference | operator[] (ptrdiff_t index) const |
Const subscripting operator overload with unchecked access. More... | |
reference | at (ptrdiff_t index) |
Subscript into the AutoArray with checked access. More... | |
const_reference | at (ptrdiff_t index) const |
Subscript into the AutoArray with checked access. More... | |
iterator | begin () |
Obtain an iterator to the beginning of the AutoArray. More... | |
const_iterator | begin () const |
Obtain an iterator to the beginning of the AutoArray. More... | |
const_iterator | cbegin () const |
Obtain an iterator to the beginning of the AutoArray. More... | |
iterator | end () |
Obtain an iterator to the end of the AutoArray. More... | |
const_iterator | end () const |
Obtain an iterator to the end of the AutoArray. More... | |
const_iterator | cend () const |
Obtain an iterator to the end of the AutoArray. More... | |
size_type | size () const |
Obtain the number of accessible elements. More... | |
void | resize (size_type new_size, bool free=false) |
Change the number of accessible elements. More... | |
void | copy (const T *buffer) |
Deep-copy the contents of a buffer into this AutoArray. More... | |
void | copy (const T *buffer, size_type size) |
Deep-copy the contents of a buffer into this AutoArray. More... | |
std::vector< T > | to_vector () const |
Obtain a copy of elements in this AutoArray as a vector. More... | |
AutoArray (size_type size=0) | |
Construct an AutoArray. More... | |
AutoArray (const AutoArray ©) | |
Construct an AutoArray. More... | |
AutoArray (AutoArray &&rvalue) noexcept | |
Construct an AutoArray. More... | |
AutoArray (std::initializer_list< T > ilist) | |
Construct an AutoArray. More... | |
AutoArray & | operator= (const AutoArray &other) |
Copy assignment operator overload performing a deep copy. More... | |
AutoArray & | operator= (AutoArray &&other) noexcept(noexcept(std::swap(std::declval< value_type & >(), std::declval< value_type & >())) &&noexcept(std::swap(std::declval< size_type & >(), std::declval< size_type & >()))) |
Move assignment operator. More... | |
~AutoArray () | |
Destructor. More... | |
A C-style array wrapped in the facade of a C++ STL container.
Forward declaration.
Objects of this type should be treated in the traditional manner for containers, where (size_type) construction creates an array of the given size, while {...} construction creates an array with the given elements.
Definition at line 44 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::value_type = T |
Type of element.
Definition at line 48 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::size_type = size_t |
Type of subscripts, counts, etc.
Definition at line 50 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::iterator = AutoArrayIterator<false, T> |
Iterator of element.
Definition at line 53 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::const_iterator = AutoArrayIterator<true, T> |
Const iterator of element.
Definition at line 55 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::reference = T& |
Reference to element.
Definition at line 59 of file be_memory_autoarray.h.
using BiometricEvaluation::Memory::AutoArray< T >::const_reference = const T& |
Const reference element.
Definition at line 61 of file be_memory_autoarray.h.
|
explicit |
Construct an AutoArray.
[in] | size | The number of elements this AutoArray should initially hold. |
Error::MemoryError | Could not allocate new memory. |
Definition at line 730 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::AutoArray | ( | const AutoArray< T > & | copy | ) |
Construct an AutoArray.
Error::MemoryError | Could not allocate new memory. |
Definition at line 744 of file be_memory_autoarray.h.
|
noexcept |
Construct an AutoArray.
[in] | rvalue | An rvalue reference to an AutoArray whose contents will be moved and destroyed. |
Definition at line 759 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::AutoArray | ( | std::initializer_list< T > | ilist | ) |
Construct an AutoArray.
[in] | ilist | An initializer list of type T. |
Definition at line 773 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::~AutoArray |
Destructor.
Definition at line 783 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::operator T* |
Convert AutoArray to T array.
Definition at line 588 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::operator const T * |
Convert AutoArray to const T array.
Definition at line 594 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::reference BiometricEvaluation::Memory::AutoArray< T >::operator[] | ( | ptrdiff_t | index | ) |
Subscripting operator overload with unchecked access.
[in] | index | Subscript into underlying storage. |
Definition at line 605 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_reference BiometricEvaluation::Memory::AutoArray< T >::operator[] | ( | ptrdiff_t | index | ) | const |
Const subscripting operator overload with unchecked access.
[in] | index | Subscript into underlying storage. |
Definition at line 613 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::reference BiometricEvaluation::Memory::AutoArray< T >::at | ( | ptrdiff_t | index | ) |
Subscript into the AutoArray with checked access.
[in] | index | Subscript into underlying storage. |
out_of_range | Specified index is outside the bounds of this AutoArray. |
Definition at line 565 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_reference BiometricEvaluation::Memory::AutoArray< T >::at | ( | ptrdiff_t | index | ) | const |
Subscript into the AutoArray with checked access.
index | Subscript into underlying storage. |
out_of_range | Specified index is outside the bounds of this AutoArray. |
Definition at line 552 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::iterator BiometricEvaluation::Memory::AutoArray< T >::begin |
Obtain an iterator to the beginning of the AutoArray.
Definition at line 668 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_iterator BiometricEvaluation::Memory::AutoArray< T >::begin |
Obtain an iterator to the beginning of the AutoArray.
Definition at line 675 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_iterator BiometricEvaluation::Memory::AutoArray< T >::cbegin |
Obtain an iterator to the beginning of the AutoArray.
Definition at line 683 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::iterator BiometricEvaluation::Memory::AutoArray< T >::end |
Obtain an iterator to the end of the AutoArray.
Definition at line 691 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_iterator BiometricEvaluation::Memory::AutoArray< T >::end |
Obtain an iterator to the end of the AutoArray.
Definition at line 705 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::const_iterator BiometricEvaluation::Memory::AutoArray< T >::cend |
Obtain an iterator to the end of the AutoArray.
Definition at line 713 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T >::size_type BiometricEvaluation::Memory::AutoArray< T >::size |
Obtain the number of accessible elements.
Definition at line 496 of file be_memory_autoarray.h.
void BiometricEvaluation::Memory::AutoArray< T >::resize | ( | size_type | new_size, |
bool | free = false |
||
) |
Change the number of accessible elements.
[in] | new_size | The number of elements the AutoArray should have allocated. |
[in] | free | Whether or not excess memory should be freed if the new size is smaller than the current size. |
Error::MemoryError | Problem allocating memory. |
Definition at line 504 of file be_memory_autoarray.h.
void BiometricEvaluation::Memory::AutoArray< T >::copy | ( | const T * | buffer | ) |
Deep-copy the contents of a buffer into this AutoArray.
[in] | buffer | An allocated buffer whose contents will be deep-copied into this object. Only size() bytes will be copied. |
Definition at line 534 of file be_memory_autoarray.h.
void BiometricEvaluation::Memory::AutoArray< T >::copy | ( | const T * | buffer, |
size_type | size | ||
) |
Deep-copy the contents of a buffer into this AutoArray.
[in] | buffer | An allocated buffer whose contents will be deep-copied into this object. |
[in] | size | The number of bytes from buffer that will be deep-copied. |
Definition at line 542 of file be_memory_autoarray.h.
std::vector< T > BiometricEvaluation::Memory::AutoArray< T >::to_vector |
Obtain a copy of elements in this AutoArray as a vector.
Definition at line 578 of file be_memory_autoarray.h.
BiometricEvaluation::Memory::AutoArray< T > & BiometricEvaluation::Memory::AutoArray< T >::operator= | ( | const AutoArray< T > & | other | ) |
Copy assignment operator overload performing a deep copy.
[in] | other | AutoArray to be copied. |
Error::MemoryError | Could not allocate new memory. |
Definition at line 622 of file be_memory_autoarray.h.
|
noexcept |
Move assignment operator.
[in] | other | rvalue reference to another AutoArray, whose contents will be moved and cleared from itself. |
Definition at line 646 of file be_memory_autoarray.h.