70 template<
typename DataFormat>
115# if __has_warning("-Wunsafe-buffer-usage")
116# pragma clang diagnostic push
117# pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
120 return *(
data() + idx);
122# if __has_warning("-Wunsafe-buffer-usage")
123# pragma clang diagnostic pop
138# if __has_warning("-Wunsafe-buffer-usage")
139# pragma clang diagnostic push
140# pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
145# if __has_warning("-Wunsafe-buffer-usage")
146# pragma clang diagnostic pop
166 return Detail::array1DToString(
size());
174 , m_data{ std::move(
data) }
178 std::shared_ptr<const DataFormat[]> m_data;
199 return array.
begin();
#define ZIVID_UTILS_EXPORT
Definition UtilsExport.h:56
One-dimensional container of data.
Definition Array1D.h:72
const DataFormat & operator()(size_t idx) const
Constant reference to an element given by an index.
Definition Array1D.h:112
const DataFormat * data() const
Pointer to the first data element of the array.
Definition Array1D.h:101
const DataFormat * ConstIterator
The iterator type for immutable access. It iterates over individual Array1D elements.
Definition Array1D.h:80
ConstIterator end() const
Iterator to the end of the array.
Definition Array1D.h:135
DataFormat ValueType
The type of the elements stored in the Array.
Definition Array1D.h:75
ConstIterator cbegin() const
Iterator to the beginning of the array.
Definition Array1D.h:152
size_t size() const
Get the number of elements in the array.
Definition Array1D.h:88
std::string toString() const
Get array information as string.
Definition Array1D.h:164
bool isEmpty() const
Check if the array is empty.
Definition Array1D.h:94
ConstIterator cend() const
Iterator to the end of the array.
Definition Array1D.h:158
ConstIterator begin() const
Iterator to the beginning of the array.
Definition Array1D.h:129
friend class Array1DFactory
Definition Array1D.h:170
Array1D()
Create an empty Array1D.
Definition Array1D.h:83
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:84
Array1D< T >::ConstIterator end(const Array1D< T > &array)
Iterator to the end of the array.
Definition Array1D.h:211
Array1D< T >::ConstIterator cend(const Array1D< T > &array)
Iterator to the end of the array.
Definition Array1D.h:204
Array1D< T >::ConstIterator begin(const Array1D< T > &array)
Iterator to the beginning of the array.
Definition Array1D.h:197
Array1D< T >::ConstIterator cbegin(const Array1D< T > &array)
Iterator to the beginning of the array.
Definition Array1D.h:190
std::ostream & operator<<(std::ostream &stream, const Array1D< T > &array)
Serialize array information to a stream.
Definition Array1D.h:183